import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("Height: ");
int height = in.nextInt();
System.out.print("Age: ");
int age = in.nextInt();
System.out.print("Citizen(Y/N): ");
String citizen = in.next();
System.out.print("Recommended(Y/N): ");
String recommended = in.next();
if (recommended.equalsIgnoreCase("y") ||
(height >= 200 && age >= 21 && age <= 25 && citizen.equalsIgnoreCase("y"))) {
System.out.println("Accepted");
}else{
System.out.println("Rejected");
}
}
}
Comments
Leave a comment