2.Create a complete C++ program that will compute for the student’s grade by averaging his/her grade in three periods (PRELIM, MIDTERM and TENT. FINALS) and supply its equivalent decimal grade using the table below.
AVERAGEDECIMAL GRADE
95 to 100 1.0
90 to 94 1.5
85 to 89 2.0
76 to 84 2.5
75 3.0
Below 75 5.0
#include<iostream.h>
#include<conio.h>
int p,m,f,grade;
int main ()
{clrscr();
cout<<"Enter Prelim grade \n";
cin>>p;
cout<<"Enter Midterm grade \n";
cin>>m;
cout<<"Enter Finals grade \n";
cin>>f;
grade=(p+m+f)/3
cout<<"Average grade is : " <<grade<< "\n";
if(grade>=95)
cout<<"1.0 \n";
else if(grade>=90)
cout<<"1.5 \n";
else if(grade>=85)
cout<<"2.0 \n";
else if(grade>=76)
cout<<"2.5 \n";
else if(grade==75)
cout<<"3.0 \n";
else if(grade<=74)
cout<<"5.0 \n";
getch();
return 0;
}
THANK YOU!
AVERAGEDECIMAL GRADE
95 to 100 1.0
90 to 94 1.5
85 to 89 2.0
76 to 84 2.5
75 3.0
Below 75 5.0
#include<iostream.h>
#include<conio.h>
int p,m,f,grade;
int main ()
{clrscr();
cout<<"Enter Prelim grade \n";
cin>>p;
cout<<"Enter Midterm grade \n";
cin>>m;
cout<<"Enter Finals grade \n";
cin>>f;
grade=(p+m+f)/3
cout<<"Average grade is : " <<grade<< "\n";
if(grade>=95)
cout<<"1.0 \n";
else if(grade>=90)
cout<<"1.5 \n";
else if(grade>=85)
cout<<"2.0 \n";
else if(grade>=76)
cout<<"2.5 \n";
else if(grade==75)
cout<<"3.0 \n";
else if(grade<=74)
cout<<"5.0 \n";
getch();
return 0;
}
THANK YOU!
