1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
#include <iostream>
using namespace std;
int main() {
int averagelab;
int averagehw ;
int HW1, HW2, HW3, HW4, HW5, HW6, HW7, HW8;
cin >> HW1 >> HW2 >> HW3 >> HW4 >> HW5 >> HW6 >> HW7 >> HW8 ;
averagehw = ( HW1 + HW2 + HW3 + HW4 + HW5 + HW6 + HW7 + HW8 ) / 8 ;
int LAB1, LAB2, LAB3, LAB4, LAB5, LAB6, LAB7, LAB8, LAB9, LAB10;
cin >> LAB1 >> LAB2 >> LAB3 >> LAB4 >> LAB5 >> LAB6 >> LAB7 >> LAB8 >> LAB9 >> LAB10 ;
averagelab = ( LAB1 + LAB2 + LAB3 + LAB4 + LAB5 + LAB6 + LAB7 + LAB8 + LAB9 + LAB10 ) / 10 ;
int MIDTERM ;
cin>> MIDTERM ;
int FINAL ;
cin>> FINAL ;
cout << " Average Homework Grade is:" << averagehw <<endl;
cout<<" Average Lab Grade is:" << averagelab <<endl ;
cout<<" Average Course Grade is:" << (averagelab*.20+averagehw*.10+MIDTERM*.30+FINAL*.40 )<<endl ;
int LETTERGRADE ;
LETTERGRADE = (averagelab*.20+averagehw*.10+MIDTERM*.30+FINAL*.40 );
if (LETTERGRADE <= 100 && LETTERGRADE > 90)
cout << " Letter Grade For the Course is an A"<<endl;
else if (LETTERGRADE <= 90 && LETTERGRADE > 85)
cout << " Letter Grade For the Course is an A-"<<endl;
if (LETTERGRADE <= 85 && LETTERGRADE > 80)
cout << " Letter Grade For the Course is a B+"<<endl;
else if (LETTERGRADE <= 80 && LETTERGRADE > 75)
cout << " Letter Grade For the Course is a B"<<endl;
if (LETTERGRADE <= 75 && LETTERGRADE > 70)
cout << " Letter Grade For the Course is a B-"<<endl;
else if (LETTERGRADE <= 70 && LETTERGRADE > 65)
cout << " Letter Grade For the Course is a C+"<<endl;
if (LETTERGRADE <= 65 && LETTERGRADE > 60)
cout << " Letter Grade For the Course is a C"<<endl;
else if (LETTERGRADE <= 60 && LETTERGRADE > 55)
cout << " Letter Grade For the Course is a C-"<<endl;
else if (LETTERGRADE <= 55 && LETTERGRADE > 50)
cout << " Letter Grade For the Course is a D+"<<endl;
else if (LETTERGRADE <= 50 && LETTERGRADE > 45)
cout << " Letter Grade For the Course is a D"<<endl;
else if (LETTERGRADE <= 45 && LETTERGRADE > 40)
cout << " Letter Grade For the Course is a D-"<<endl;
else if (LETTERGRADE <= 40 && LETTERGRADE > 0)
cout << " Letter Grade For the Course is an F"<<endl;
}
|