Wft id happening here? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Wft id happening here?

I dont know, It was for the chalenge https://code.sololearn.com/c7DecejvJemM/?ref=app

26th Mar 2019, 3:54 PM
The Guayguy
The Guayguy - avatar
1 Answer
0
https://code.sololearn.com/cFwyLiYq2OzS/?ref=app I didn't understand what the array was for, but in any case you were checking it before there was anything in it (while it was uninitialized). I removed that, and replaced it with a simple while (num != 0); (and changed the second if to an else if), and it now works like a charm.
26th Mar 2019, 4:31 PM
Vlad Serbu
Vlad Serbu - avatar