Assignemnt #52 and The Worst Number-Guessing Game
Code
/// Name: Kyle Ivy
/// Period: 5
/// Program Name: GuessGame
/// File Name: GuessGame.java
/// Date Finished: 12/2/2015
import java.util.Scanner;
public class GuessGame
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int secretNumber = 24;
int guess;
System.out.println("bet u CANT GUESS NOMBER RITE!1!! ");
System.out.println();
System.out.println("I THINK have nOMber in me HED! GUEssS!? ");
guess = keyboard.nextInt();
if (guess == secretNumber )
System.out.println("u CHEAT! No W4y u GUsee! " );
else System.out.println( "HA!! trY AGAinn! NoOMBer WeS " + secretNumber + "!11" );
}
}
prog52.PNG