+ 1

A little help guys, How do i get this working. The program should prompt the user x + y

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

13th Jun 2019, 8:47 PM
Tumi Sibiya
Tumi Sibiya - avatar
2 Respostas
+ 4
Line 6: Typo -> Scanner Line 12/13: Math.random returns a double -> parse it to int x = (int)(Math.random() *25); y = (int)(Math.random() * 25); On sololearn you have to input all values at the beginning. If I'm correct you need to input 21 values.
13th Jun 2019, 9:07 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
Scanner is mispelt on line 6. Add "(int)", no quotes, before each Math.random() to cast them as integers
13th Jun 2019, 9:11 PM
Jackson O’Donnell