Assignemnt #52 and Worst Guessing Game
Code
/// Name: David Shkolnikov
/// Period: 6
/// Program Name: Worst Guessing Game
/// File Name: WorstGuessingGame.java
/// Date Finished: 11/19/2015
import java.util.Scanner;
public class WorstGuessingGame
{
public static void main( String[] args )
{
int number, guess;
number = 7;
Scanner keyboard = new Scanner(System.in);
System.out.println("TIME TO GUESS!!!!!!!");
System.out.println(" ");
System.out.print("I'm thinking of a number (1-10). Try and gusss it? ");
guess = keyboard.nextInt();
System.out.println(" ");
if ( guess == number )
{
System.out.println("NICE JOB CHAMP!!! yOU GUESSED THE NUMBER! IT WAS " + number + "!");
}
else
System.out.println("WAY TO GO YOU DEGENERATE! YOU SHOULD HAVE GUESSED IT RIGHT!!!! IT WAS " + number + "!");
}
}
Picture of the output