Hi,
tried running the following code but after entering integer input,the code gives an errror message..
pls enlighten me why..
thkx
Here is the code:
import java.util.Scanner;
import static java.lang.System.in;
import static java.lang.System.out;
class Guyton
{
public static void main(String args[])
{
Scanner myScanner = new Scanner(in);
double price = 0.00;
int age;
char reply;
out.println("Welcome to the McTwisp Movie Theatre.What is your age?");
age = myScanner.nextInt();
if (age >= 13 && age < 65)
{
price = 5.38;
}
if (age < 13 || age >= 65)
{
price = 3.00;
}
out.println("Do you have a coupon? Y/N");
reply = myScanner.findInLine(".").charAt(0);
if ( reply == 'Y' && reply == 'y')
{
price -= 2.00;
}
if (reply != 'Y' || reply != 'y' || reply != 'N' || reply != 'n')
{
out.println("Huh?");
}
out.println("Please pay $ ");
out.println("Have a great time");
}
}

