Here, we have a basic program example to determine the eligibility for admission process using different languages. This program is created in c language, c++, Java, and Python.
Program to determine the eligibility for admission process in C language
#include <stdio.h>
void main()
{
int p,c,m;
printf("Eligibility Criteria :\n");
printf("Marks in Maths >= 65\n");
printf("and Marks in Phy >= 55\n");
printf("and Marks in Chem >= 50\n");
printf("and Total in all three subject >=190\n");
printf("or Total in Maths and Physics >=140\n");
printf("-------------------------------------\n");
printf("Input the marks obtained in Physics :");
scanf("%d",&p);
printf("Input the marks obtained in Chemistry :");
scanf("%d",&c);
printf("Input the marks obtained in Mathematics :");
scanf("%d",&m);
printf("Total marks of Maths, Physics and Chemistry : %d\n",m+p+c);
printf("Total marks of Maths and Physics : %d\n",m+p);
if (m>=65){
if(p>=55){
if(c>=50){
if((m+p+c)>=190||(m+p)>=140){
printf("The candidate is eligible for admission.\n");
}
else{
printf("The candidate is not eligible.\n");
}
}
else{
printf("The candidate is not eligible.\n");
}
}
else{
printf("The candidate is not eligible.\n");
}
}
else{
printf("The candidate is not eligible.\n");
}
}
Program to determine the eligibility for admission process in C++ language
#include<iostream>
using namespace std;
int main()
{
int p,c,m;
cout<<"Eligibility Criteria :\n"<<endl;
cout<<"Marks in Maths >= 65\n"<<endl;
cout<<"and Marks in Phy >= 55\n"<<endl;
cout<<"and Marks in Chem >= 50\n"<<endl;
cout<<"and Total in all three subject >=190\n"<<endl;
cout<<"or Total in Maths and Physics >=140\n"<<endl;
cout<<"-------------------------------------\n"<<endl;
cout<<"Input the marks obtained in Physics : " ;
cin>>p;
cout<<"Input the marks obtained in Chemistry : ";
cin>>c;
cout<<"Input the marks obtained in Mathematics : ";
cin>>m;
cout<<"Total marks of Maths, Physics and Chemistry : "<< m+p+c<<endl;
cout<<"Total marks of Maths and Physics : "<<m+p<<endl;
if (m>=65){
if(p>=55){
if(c>=50){
if((m+p+c)>=190||(m+p)>=140){
cout<<"The candidate is eligible for admission.\n";
}
else{
cout<<"The candidate is not eligible.\n";
}
}
else{
cout<<"The candidate is not eligible.\n";
}
}
else{
cout<<"The candidate is not eligible.\n";
}
}
else{
cout<<"The candidate is not eligible.\n";
}
}
Program to determine the eligibility for admission process in Python language
print("Eligibility Criteria :\n")
print("Marks in Maths >= 65\n")
print("and Marks in Phy >= 55\n")
print("and Marks in Chem >= 50\n")
print("and Total in all three subject >=190\n")
print("or Total in Maths and Physics >=140\n")
print("-------------------------------------\n")
p = int(input("Input the marks obtained in Physics : "))
c = int(input("Input the marks obtained in Chemistry : "))
m = int(input("Input the marks obtained in Mathematics : "))
print("Total marks of Maths, Physics and Chemistry : ", m+p+c)
print("Total marks of Maths and Physics : ", m+p)
if (m>=65) :
if(p>=55):
if(c>=50):
if((m+p+c)>=190 or (m+p)>=140):
print("the candidate is eligible for admission.\n")
else:
print("the candidate is not eligible for admission.\n")
else:
print("the candidate is not eligible for admission.\n")
else:
print("the candidate is not eligible for admission.\n")
else:
print("the candidate is not eligible for admission.\n")
Program to determine the eligibility for admission process in Java language
import java.util.*;
class eligibility
{
public static void main(String[] args)
{
System.out.println("Eligibility Criteria :");
System.out.println("Marks in Maths >= 65");
System.out.println("and Marks in Phy >= 55");
System.out.println("and Marks in Chem >= 50");
System.out.println("and Total in all three subject >=190");
System.out.println("or Total in Maths and Physics >=140");
System.out.println("-------------------------------------");
int p, c, m,t,mp;
Scanner s=new Scanner(System.in);
System.out.println("Input the marks obtained in Physics :");
p = s.nextInt();
System.out.println("Input the marks obtained in Chemistry :");
c = s.nextInt();
System.out.println("Input the marks obtained in Mathematics :");
m = s.nextInt();
t=m+p+c;
mp=m+p;
System.out.println("Total marks of Maths, Physics and Chemistry : "+t);
System.out.println("Total marks of Maths and Physics : "+mp);
if (m>=65){
if(p>=55){
if(c>=50){
if((t)>=190||(mp)>=140){
System.out.println("The candidate is eligible for admission.");
}
else{
System.out.println("The candidate is not eligible.");
}
}
else{
System.out.println("The candidate is not eligible.");
}
}
else{
System.out.println("The candidate is not eligible.");
}
}
else{
System.out.println("The candidate is not eligible.");
}
}
}