Assignemnt #52 The Worst Number-Guessing Game Ever
Code
///Name: Prooz Fereydouni
///Period: 7
///Project Name: The Worst Number-Guessing Game Ever
///File Name: TWNGGE.java
///Date: 11/10/2015
import java.util.Scanner;
public class TWNGGE
{
public static void main( String[] args)
{
Scanner keyboard = new Scanner(System.in);
int SN=7, guess=0;
System.out.println("THE WORST NUMBER GUESSING GAME EVER!!!!!!!!!!");
System.out.println("");
System.out.print("I'm Thinking of a number from 1-10. Try to guess! ");
guess = keyboard.nextInt();
System.out.println("");
if(guess == SN)
{
System.out.print("WOOOHOOO!You got it right! It was " + SN + "!");
}
else
{
System.out.println("BOOOOOOO!YOU SUCK! It was " + SN + "!");
}
}
}
Picture of the output