Assignment #52 and The Worst Guessing Game
Code
/// Name: Graham Pollock
/// Period: 5
/// Program Name: Worst Guessing Game
/// File Name: WostGuessingGame.java
/// Date Finished: 11/13/2015/
import java.util.*;
public class WorstGuessingGame
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int i = 3;
int g;
System.out.println("THE WORST GUESSING GAME EVER!!!");
System.out.println();
System.out.println("I'M THINKING OF A NUMBER 1-10");
System.out.print("TRY TO GUESS IT!! ");
g = keyboard.nextInt();
if (g >= 4)
{ System.out.println("AWE SHUCKS, YOU GUESSED " + g + " BUT IT WAS ACTUALLY " + i); }
if (g <= 2)
{ System.out.println("AWE SHUCKS, YOU GUESSED " + g + " BUT IT WAS ACTUALLY " + i); }
if (g == 3)
{ System.out.println("CONGRATS!!! YOU GUESSED " + g + " CORRECTLY"); }
}
}
Picture of the output