write a c++ program about this "Compute the final grade, the user will supply the recitation, exam, project, and attendance grade. Recitation is 15%, Exam is 35%, Project is 20% and Attendance is 30%. Final grade will be the sum of recitation, exam, project and attendance after getting the corresponding percentages."
#include<iostream>
using namespace std;
int main()
{
double recitation, exam, project, attendance;
cout<<"Computing final grade:\n";
cout<<"Please, enter a grade for the Recitationn:";
cin>>recitation;
cout<<"Please, enter a grade for the Exam:";
cin>>exam;
cout<<"Please, enter a grade for the Project:";
cin>>project;
cout<<"Please, enter a grade for the Attendance:";
cin>>attendance;
double final=0.15*recitation+0.35*exam+0.2*project+0.3*attendance;
cout<<"The final grade is:"<<final;
}
Comments
Leave a comment