Code
/// Name: Afaf Nabeeha
/// Period: 7
/// Program Name: The Worst Number-Guessing Game Ever
/// File Name: Game.java
/// Date Finished: 11/25/2015 public class Game
import java.util.Scanner;
public class Game
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int userNumber, myNumber;
myNumber = 4;
System.out.println( "TEH WORST NUMBER GUESSING GAME EVAR!!!1! " );
System.out.println();
System.out.print( "I'M THINKING OF A NBR FROM 1-10. TRY TO GESS! " );
userNumber = keyboard.nextInt();
System.out.println();
if ( myNumber == userNumber )
{
System.out.println( "LOL!!!! U GOT IT! I CANT BELEIVE U GESSED IT WAS " + myNumber + "!" );
}
else if ( myNumber != userNumber )
{
System.out.println( "WOOT U SUXOR!!! I PWN JOO!!!! IT WAS " + myNumber + "!" );
}
}
}
Picture of the output