Assignment #52 and The Worst Number-Guessing Game Ever
Code
/// Name: Ali Kurland
/// Period: 6
/// Program Name: Secret Number
/// File Name: SecretNumber.java
/// Date Finished: 10/6/2015
import java.util.Scanner;
public class SecretNumber
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int j, guess;
j = 6;
System.out.println( "TEH WORST NUMBER-GUESSING GAME EVAR!!1!" );
System.out.print( "I'M THINKNG OF A NMBR FROM 1-10. TRY 2 GUESS!!!" );
guess = keyboard.nextInt();
System.out.println( " " );
if ( guess == j )
{
System.out.println( "U GOT IT!!1! I CAN't BELEIVE U GUESSED IT WAS 6!!!" );
}
else
{
System.out.println( "NOPE!!1! U LOSE!! IT WAS 6!!!" );
}
}
}
Picture of the output