Assignemnt #52 The Worst Number Guessing Game Ever
Code
///Name: Morgan Kaplan
///Period: 5
///Project Name: Number Guessing Game
///File Name: GuessGame.java
import java.util.Scanner;
public class GuessGame
{
public static void main( String[] args )
{
Scanner momo= new Scanner(System.in);
int n, v=4;
System.out.println ( " The Worst Number-Guessing Game Ever" );
System.out.println ( " What number am I thinking of?" );
n=momo.nextInt();
if ( n==v )
{
System.out.println( " wow youre right." );
}
else
{
System.out.println( "Wrong." );
}
}
}
Picture of Output