Assignemnt #52 and The Worst Number-Guessing Game Ever
Code
/// Name: Tristan Chung
/// Period: 5
/// Program Name: Worst Game
/// File Name: WorstGame.java
/// Date Finished: 11/13/2015
import java.util.Scanner;
public class WorstGame
{
public static void main( String [] args)
{
int number = 7;
int guess;
Scanner keyboard = new Scanner(System.in);
System.out.println("The absolute worst game you could play!");
System.out.println();
System.out.println("Im thinking of a number between 1-10, try to guess it!");
guess = keyboard.nextInt();
if (guess == number )
System.out.println(" See, this game is the worst!" );
else System.out.println( "Wow your terrible at this game" );
}
}
Picture of the output