0

Program is not Running proprely

What is the problem with my code!! if I made any syntax error? if not then why my code is not taking any input ? please help me to sort it out :) https://code.sololearn.com/chs8hQUTS0rp/?ref=app

10th Jun 2020, 3:07 PM
RATIKANT PARIDA
RATIKANT PARIDA - avatar
5 Answers
+ 2
This is infinity loop. Condition inside of 'for' will be true always. Because i = N = 5 and it will be increased in every loop. So it will be greater than 1 always. Change i++ to i--.
10th Jun 2020, 3:19 PM
Sharofiddin
Sharofiddin - avatar
+ 5
Please mention the language you are using.
10th Jun 2020, 3:10 PM
Lothar
Lothar - avatar
+ 2
Thanks Sharofiddin .. Idk how I made this silly mistake but thanks to all who manage their valuable time to answer this query... Happy coding:)
10th Jun 2020, 3:26 PM
RATIKANT PARIDA
RATIKANT PARIDA - avatar
+ 2
10th Jun 2020, 5:16 PM
Sharofiddin
Sharofiddin - avatar
+ 1
In line 10 you have to use i-- as you want to decrement from N to 1
10th Jun 2020, 3:12 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar