Assignemnt #52
Code
/// Name: Daniel Nguyen
/// Period: 6
/// Program Name: Guessing Program
/// File Name: Guessing.java
/// Date Finished: 9/9/2015
import java.util.Scanner;
public class Guessing
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int random, guess;
random = 3;
System.out.println("TEH WORST NUMBER GESSING GAME EVAR!!!!1!!!!!!");
System.out.println("");
System.out.println("I'm TINKING OF A NMBR FRAM 1-10. TRY 2 GESS!!!!");
System.out.print("> ");
guess = keyboard.nextInt();
System.out.println("");
if (guess == random) {
System.out.println("LOL!!! U GOT IT! I CANT BELIEVE U GESSED IT WAS 3!!!!!!");
}
else {
System.out.println("W00T! U SUX02!!! I PWN J00!!! IT WAS 3! HA!");
}
}
}
Picture of the output