+ 2
Kgosigadi you didn't declare the variable "input"
+ 1
Your while loop closed before the if statement. i value not going to change anywhere!. So it's infinite loop. i++ is the last statement in program , not inside loop.
Remove } before if statement, and add it after I++; statement..
edit: also
semi colon after if statement condition , terminates if block.
remove it.
Hope it helps...
+ 1
Kgosigadi your if block is empty caused by a semicolon. then you have a sys out statement then an else alone.
beside that, the while loop just read inputs, the rest are outside while block. there might be other errors as well.
+ 1
Kgosigadi If you are trying this program in Sololearn playground then it don't work as SL don't have gyi support. Only support console output. So try in your system. Code is fine.