It is the question "Initials" from Code Coach. I've successfully completed it but I think it is wrong. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

It is the question "Initials" from Code Coach. I've successfully completed it but I think it is wrong.

As for first test case, there were 4 names. I ran my loop from [0,3] (i=0,i<4) but still it missed the last name. Same was happening in all other test cases. So I changed the loop to [0,4] (i=0,i<=4) and it ran successfully. Please tell me if there is something I'm not getting, for it didn't happen in any other code before. This is my code: https://code.sololearn.com/cK6lq75NIdOk/?ref=app

15th Jul 2020, 6:17 AM
Prabhanshu Chaturvedi
2 Answers
+ 5
I see. Thank you I got it! I'll also try it with getchar().
15th Jul 2020, 7:03 AM
Prabhanshu Chaturvedi
+ 4
I successfully executed it with getchar(). I'll now see if I can complete New Driver's License problem.
15th Jul 2020, 7:12 AM
Prabhanshu Chaturvedi