import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter the year of the person");
int year = scan.nextInt();
if(year>=12 && year<=65){
System.out.println("Does not qualify for the discount\n");
}
else{
System.out.println("Enter the number of times you are visiting the park");
int time = scan.nextInt();
if(time>=5){
System.out.println("Qualifies for the discount\n");
}
else{
System.out.println("Does not qualify for the discount\n");
}
}
}
}
Comments
Leave a comment