Ask coding questions

← Back to all posts
How to loop a program?
ThomasWeaver

I made a game in java that generates a number and you have to guess the number that the computer generates. Once they get it right I'm supposed to ask if they want to play again, but I don't understand how I'm supposed to re-run the game. Anybody know?

Voters
MacHerrington
Rivera-NixonNix
tvdfan
d3xvr
lucrezia70
ThomasWeaver
Comments
hotnewtop
Geocube101

My first guess is a while loop.

My second guess is to use functions: