Assignemnt #52 and Worst Game ever
Code
///Name: Ben Borglin
///Period: 6
///Program Name: Worst Game Ever
///File Name: WorstGame.java
///Date finished: 10/8/15
import java.util.Scanner;
public class WorstGame
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int number, guess;
number = 3;
System.out.println("Guess a number between 1-10");
guess = keyboard.nextInt();
System.out.println(" ");
if (number == guess)
{
System.out.println("Gratz you got it!");
}
else
{
System.out.println("Sorry try again");
}
}
}
Picture of the output