c++ code not showing output | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

c++ code not showing output

I don't know why but this code is not showing any output. I checked this code more than 5 times but couldn't figure out what is wrong with this code. Here is the code: https://code.sololearn.com/ca10A16a1A9a

21st Jan 2021, 2:30 PM
Gajendra Sonare
Gajendra Sonare - avatar
4 Answers
+ 1
Simple typo on line 13: You increment 'n' instead of 'i', resulting in an infinite loop.
21st Jan 2021, 2:40 PM
Shadow
Shadow - avatar
+ 1
Yes run time error your program have becoz u incrementing value of n instead of i
21st Jan 2021, 2:44 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
Shadow Thankyou very much. I was looking for 15 mins and did not saw that. You saved my time😃
21st Jan 2021, 2:49 PM
Gajendra Sonare
Gajendra Sonare - avatar
0
♨️♨️ yes. Just found out. Thankyou
21st Jan 2021, 2:50 PM
Gajendra Sonare
Gajendra Sonare - avatar