Assignment #52 The Worst Number-Guessing Game Ever
Code
/// Name: Matthew Lorence
/// Period: 5
/// Program Name: Guess
/// File Name: Guess.java
import java.util.Scanner;
public class Guess
{
public static void main (String [] args)
{
Scanner keyboard = new Scanner (System.in);
int random, guess;
random = 4;
System.out.println("TEH WORST NUBMER GESSING GAME EVAR!!!!!!!!!!!");
System.out.print("I'M THKING OF A NBR FROM 1-10. TRY 2 GESS! ");
guess = keyboard.nextInt();
if (guess == random)
{
System.out.println("LOL!!! U GOT IT! I CANT BELELIVE U GESSED IT WAS 4!");
}
else
{
System.out.println("W00T! U SUXOR!!! I PWN J00!!! IT WAS 4!");
}
}
}
Picture of the output