Can someone tell me what's wrong with this code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can someone tell me what's wrong with this code?

https://code.sololearn.com/cR0PciW8otGd/?ref=app

19th Jul 2017, 4:47 PM
Nikko Pepito
Nikko Pepito - avatar
12 Answers
+ 2
Thanks guys
19th Jul 2017, 5:38 PM
S C
+ 21
Nice question 👏 One more thing to add: redo++; just before }while (redo <= 10); otherwise you will never exit your do-while loop
19th Jul 2017, 5:27 PM
Jafca
Jafca - avatar
+ 19
After line 35: redo++; then: }while (redo <= 10);
19th Jul 2017, 5:32 PM
Jafca
Jafca - avatar
+ 3
the variable NumberOfItems does not have a defined type
19th Jul 2017, 4:50 PM
S C
+ 3
add "int numberOfItems = 0;" at the top of your do while loop
19th Jul 2017, 4:58 PM
S C
+ 1
How am I going to fix this? you know, i'm still a student and just started programming. this is an assignment given to me by my professor.
19th Jul 2017, 4:53 PM
Nikko Pepito
Nikko Pepito - avatar
+ 1
thanks.
19th Jul 2017, 4:59 PM
Nikko Pepito
Nikko Pepito - avatar
+ 1
where will I put redo++?
19th Jul 2017, 5:30 PM
Nikko Pepito
Nikko Pepito - avatar
+ 1
Thank you so much. It's a big help for me to get better at making codes.
19th Jul 2017, 5:33 PM
Nikko Pepito
Nikko Pepito - avatar
+ 1
oh. yes. done.
19th Jul 2017, 5:38 PM
Nikko Pepito
Nikko Pepito - avatar
0
yes. Thank you again. to both you and sam.
19th Jul 2017, 5:35 PM
Nikko Pepito
Nikko Pepito - avatar
0
Tick?
19th Jul 2017, 5:36 PM
Nikko Pepito
Nikko Pepito - avatar