Why this not work ... ! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why this not work ... !

this code dont work at sololearn compailer ... please anyone profissional to check my code its not working !! this the first game to me ! https://code.sololearn.com/c1aij1eugF29/?ref=app

27th Jul 2018, 12:44 PM
Mohammad Alshareef
Mohammad Alshareef - avatar
5 Answers
+ 1
thank you so much BRO 😚
27th Jul 2018, 3:14 PM
Mohammad Alshareef
Mohammad Alshareef - avatar
+ 1
happy to help... happy learning....
27th Jul 2018, 3:20 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
solo learn does not ask for interactive input... one need to provide all required input in one go with space between all input
27th Jul 2018, 12:55 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
i know before ... but why this code didnt work at my computer .. pleae check the code
27th Jul 2018, 1:04 PM
Mohammad Alshareef
Mohammad Alshareef - avatar
0
below line is the culprit in case of level as 1: while (input != num & life > 3) life is zero initially and hence life>3 is false always... so, it will not enter into loop to ask for input again and again... just change it as below: while (input != num && life < 3)
27th Jul 2018, 1:26 PM
Ketan Lalcheta
Ketan Lalcheta - avatar