String processing methods of String class should be used where necessary!!
import java.util.Scanner;
public class QuizFl {
public static void main(String[] args) {
// TODO Auto-generated method stub
int studentScore;
String gender;
Scanner sc=new Scanner(System.in);
System.out.println("Please enter the student's score:");
studentScore=sc.nextInt();
System.out.println("Student's score is:"+studentScore);
System.out.println("Please enter the gender of student:");
gender=sc.next();
if(studentScore>25 & studentScore<=100){
System.out.println("Student is qualified for the loan.");
System.out.println("Student's gender is:"+gender);
}else{
System.out.println("Student is not qualified for the loan.");
}
}
}
Comments
Leave a comment