Why my output isn't working? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why my output isn't working?

I implemented the logic according to the problem mentioned but I am not getting the correct output. *please look at code post for better problem explanation* https://code.sololearn.com/c6mY2UeJEjjL/?ref=app

2nd Jun 2021, 12:00 PM
Lambda
Lambda - avatar
2 Answers
+ 3
you want to check if the counter is equal to or more than 2 in the loop. You are only checking after the loop is done. Also, line 44 the increment operator is written incorrectly. https://code.sololearn.com/c6W87gDzwh8J/?ref=app
2nd Jun 2021, 12:19 PM
Choe
Choe - avatar
+ 3
Choe Thanks! I got it
2nd Jun 2021, 12:28 PM
Lambda
Lambda - avatar