0
What's wrong with this code? (elementary question)
I dont't know how to convert datatypes like int to double and double to int so I found other ways to do it but this code shows up with an error and I just can't figure it out. Any help is appreciated. https://code.sololearn.com/cWHi8XG32EnL/?ref=app
3 RĂ©ponses
+ 1
you havent declare total at line 7
0
After the "input.nextInt();" remove the ";" and add ", total;". Or you can just add "int total;". You didn't declare total as an int.
0
Man I feel so stupid đ
Such a silly mistake Thanks for your help!