Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. #include<iostream>
  2. #include<conio.h>
  3. #include<stdio.h>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. 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;
  10.  
  11. cout<<"Enter Quiz 1: ";
  12. cin>>Q1;
  13.  
  14. cout<<"Enter Quiz 2: ";
  15. cin>>Q2;
  16.  
  17. cout<<"Enter Quiz 3: ";
  18. cin>>Q3;
  19.  
  20. cout<<"Enter Quiz 4: ";
  21. cin>>Q4;
  22.  
  23. cout<<"Enter Quiz 5: ";
  24. cin>>Q5;
  25.  
  26. Ave=(Q1+Q2+Q3+Q4+Q5)/5;
  27.  
  28. cout<<"The average of 5 quizzes is: "<<Ave <<endl;
  29.  
  30. float Ave_30;
  31.  
  32. Ave_30= Ave* 0.3; // 30% of average quiz marks to calculate term grade
  33. cout<<"The 30% of all quizzes is: "<<Ave_30 <<endl;
  34.  
  35.  
  36. cout<<"Enter Participation: ";
  37. cin>>Par;
  38. cout<<"Enter Hands on Exercise: ";
  39. cin>>Hoe;
  40. cout<<"Enter Recitation: ";
  41. cin>>Rec;
  42. cout<<"Enter Project: ";
  43. cin>>Prj;
  44.  
  45. CS = Par*0.2+ Hoe*0.3+ Rec*0.2+Prj*0.3;
  46.  
  47. cout<<"The Total CS is: "<<CS;
  48.  
  49. float CS_40;
  50.  
  51. CS_40= CS* 0.4; // 40 % of total CS to calculate term grade
  52.  
  53. cout<<"The 40% CS is: "<<CS_40;
  54.  
  55. getch();
  56. return 0;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement