#include
#include
int main()
{
clrscr();
float CSE,MATH,ENGLISH,EEE,PHYSICS,sum,avrg;
cout<<"Enter marks of CSE: "; cin>>CSE;
cout<<"Enter marks of MATH: "; cin>>MATH;
cout<<"Enter marks of ENGLISH: "; cin>>ENGLISH;
cout<<"Enter marks of EEE: "; cin>>EEE;
cout<<"Enter marks of PHYSICS: "; cin>>PHYSICS;
sum=CSE+MATH+ENGLISH+EEE+PHYSICS;
avrg=sum/5;
if(CSE<40||MATH<40||ENGLISH<40||EEE<40||PHYSICS<40) cout<<"Promoted"; else if(avrg>=80&&avrg<=100) cout<<"A+"<<' '<<4.00; else if(avrg>=75&&avrg<=79) cout<<"A"<<' '<<3.75; else if(avrg>70&&avrg<=74) cout<<"A-"<<' '<<3.50; else if(avrg>=65&&avrg<=69) cout<<"B"<<' '<<3.25; else if(avrg>=60&&avrg<=64) cout<<"B"<<' '<<3.00; else if(avrg>=55&&avrg<=59) cout<<"B-"<<' '<<2.75; else if(avrg>=50&&avrg<=54) cout<<"C+"<<' '<<2.50; else if(avrg>=45&&avrg<=49) cout<<"C"<<' '<<2.25; else if(avrg>=40&&avrg<=44)
cout<<"D"<<' '<<2.00;
getch();
return 0;
}
Output:
Enter marks of CSE: 81
Enter marks of MATH: 72
Enter marks of ENGLISH: 65
Enter marks of EEE: 74
Enter marks of PHYSICS: 68
A- 3.5
No comments:
Post a Comment