Assignemnt #52, The Worst Number-Guessing Game Ever
Code
/// Name: Alex Pinder
/// Period: 5
/// Program Name: The Worst Number-Guessing Game Ever
/// File Name: prog52.java
/// Date Complete: 12/9/15
import java.util.Scanner;
public class prog52
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int number, guess;
number = 6;
System.out.println( "TEH WRST NUMBER GESSING GAME EVR!!!!!!1!!!" );
System.out.print( "IM THNKING OF A # FROM 1-10! TRY 2 GESS! " );
guess = keyboard.nextInt();
// theyll nevr gess!
if ( guess == number )
{
System.out.println( "OOoOooO...?!?!11? thEY GEsSeD iT!!!! HoW DId yoU GeSS " + number + "?!??!?" );
}
else if ( guess != number )
{
System.out.println( "U GESSED RONG! IT WAS " + number + "!" );
}
}
}
Picture of the output