Final Project Homework Thing
Final Project Homework Thing
Scanner;
public class Homework
{
public static void main (String[] args)
{
String str, another = "y";
Scanner input = new Scanner (System.in);
int random = (int)((Math.random()*5) + 1);
int guess = 0;
int count = 0;
while (another.equalsIgnoreCase("y"))
{
random = (int)((Math.random()*100) + 1);
System.out.println("The secret number is from 1 to 100 (inclusive)");
System.out.println();
System.out.print("Enter your guess (0 to quit): ");
guess = input.nextInt();
count = 0;
while (guess != 0)
{
if (guess > random)
{
}
}
System.out.println();
System.out.print ("Play again (y/n)?: ");
another = input.next();
System.out.println();
}
}
}