Write the PROGRAM to process the application to list the eligible candidates.

Admission to a professional course is subject to following conditions:
Marks in mathematics>=60
Marks in physics>=50
Marks in chemistry>=40
Total in all 3 subjects>=200 (OR)Total in mathematics and physics>=150 given the marks in the 3 subjects.

 

PROGRAM:

import java.util.*;
public class P8
{
public static void main(String[] args)
{
Scanner scan=new Scanner(System.in);
System.out.print("Enter Marks in Math:");
int mathMarks=scan.nextInt();
System.out.print("Enter Marks in Physics:");
int phyMarks=scan.nextInt();
System.out.print("Enter Marks in Chemistry:");
int chemMarks=scan.nextInt();
if (mathMarks >= 60) {
if (phyMarks >= 50) {
if (chemMarks >= 40) {
if (((mathMarks + phyMarks + chemMarks) >=200) || ((mathMarks + phyMarks) >=150)) {
System.out.println("Candidate is Eligible");
}
}
}
}
else
{
System.out.println("Candidate is not Eligible");
}
}
}

OUTPUT:

(Visited 4,865 times, 4 visits today)
Share with Friends :
Written by: