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(C - citizen, N - non-citizen): ");
String citizen = in.next();
System.out.print("Recommendee(R - recommendee, N - non-recommendee): ");
String recommended = in.next();
if (recommended.equalsIgnoreCase("R") ||
(height >= 200 && age >= 21 && age <= 25 && citizen.equalsIgnoreCase("C"))) {
System.out.println("Accepted");
}else{
System.out.println("Rejected");
}
}
}
Comments
Leave a comment