To qualify for a loan award, a student should score between 25 - 100 points and should have been admitted to an accredited institution. write a program that accept points, institution and their gender(f for female an m for male) seperated by spaces and determine if the student qualifies for an award or not. The program should also, print their gender in full and capitalized. Please see sample runs below for appropriete massages/input/output. Use table for program.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("Score, Institution, Gender : ");
int score = in.nextInt();
String institution = in.next();
String gender = in.next();
if (gender.equalsIgnoreCase("f")) {
System.out.println("FEMALE");
} else if (gender.equalsIgnoreCase("m")) {
System.out.println("MALE");
} else {
System.out.println("?");
}
if (score >= 25 && score <= 100) {
System.out.println("Qualified");
} else {
System.out.println("Not Qualified");
}
}
}
Comments
Leave a comment