Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<conio.h>
- #include<stdio.h>
- using namespace std;
- int main()
- {
- float Q1=0,Q2=0,Q3=0,Q4=0,Q5=0,Ave=0,Par=0,Hoe=0,Rec=0,Prj=0,EG=0,CS=0;
- cout<<"Enter Quiz 1: ";
- cin>>Q1;
- cout<<"Enter Quiz 2: ";
- cin>>Q2;
- cout<<"Enter Quiz 3: ";
- cin>>Q3;
- cout<<"Enter Quiz 4: ";
- cin>>Q4;
- cout<<"Enter Quiz 5: ";
- cin>>Q5;
- Ave=(Q1+Q2+Q3+Q4+Q5)/5;
- cout<<"The average of 5 quizzes is: "<<Ave <<endl;
- float Ave_30;
- Ave_30= Ave* 0.3; // 30% of average quiz marks to calculate term grade
- cout<<"The 30% of all quizzes is: "<<Ave_30 <<endl;
- cout<<"Enter Participation: ";
- cin>>Par;
- cout<<"Enter Hands on Exercise: ";
- cin>>Hoe;
- cout<<"Enter Recitation: ";
- cin>>Rec;
- cout<<"Enter Project: ";
- cin>>Prj;
- CS = Par*0.2+ Hoe*0.3+ Rec*0.2+Prj*0.3;
- cout<<"The Total CS is: "<<CS;
- float CS_40;
- CS_40= CS* 0.4; // 40 % of total CS to calculate term grade
- cout<<"The 40% CS is: "<<CS_40;
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement