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

27th Jan 2020, 4:54 PM
Sofonias
Sofonias - avatar
3 RĂ©ponses
+ 1
you havent declare total at line 7
27th Jan 2020, 4:58 PM
Taste
Taste - avatar
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.
27th Jan 2020, 4:58 PM
Odyel
Odyel - avatar
0
Man I feel so stupid 😅 Such a silly mistake Thanks for your help!
27th Jan 2020, 5:10 PM
Sofonias
Sofonias - avatar