How can i make a dice game program in java in which i can play again and again without clicking run | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can i make a dice game program in java in which i can play again and again without clicking run

25th Dec 2021, 5:36 PM
Jai Anand
Jai Anand - avatar
2 Answers
+ 2
You won't be able to do it on Sololearn because it only accepts one instance of inputs (you can input as many things as you want) and it'll give you the output all at once. If you get your code running on here then you can copy it over onto your computer (for example) and run it on the Java compiler.
26th Dec 2021, 12:48 PM
Ausgrindtube
Ausgrindtube - avatar
+ 1
1_use an infinite loop where you ask to the user to type something to run the game, else it will quit OR 2_use an infinite loop and play until you quit (may have problem with sololearn) while(input) { diceRoll(); input = controlInput(); }
25th Dec 2021, 6:35 PM
VCoder
VCoder - avatar