Answer:
In C++:
#include <iostream>
using namespace std;
int main(){
double quiz1, quiz2, quiz3, exam1, exam2, finalexam,quiz;
cout<<"Quiz 1: "; cin>>quiz1;
cout<<"Quiz 2: "; cin>>quiz2;
cout<<"Quiz 3: "; cin>>quiz3;
cout<<"Exam 1: "; cin>>exam1;
cout<<"Exam 2: "; cin>>exam2;
cout<<"Final Exam: "; cin>>finalexam;
if(quiz1<=quiz2 && quiz1 <= quiz3){ quiz=(quiz2+quiz3)/2; }
else if(quiz2<=quiz1 && quiz2 <= quiz3){ quiz=(quiz1+quiz3)/2; }
else{ quiz=(quiz1+quiz2)/2; }
int weight = 0.20 * quiz + 0.30 * ((exam1 + exam2)/2) + 0.50 * finalexam;
cout<<"Average Weight: "<<weight<<endl;
if(weight>=91 && weight<=100){ cout<<"Letter Grade: A"; }
else if(weight>=81 && weight<=90){ cout<<"Letter Grade: B"; }
else if(weight>=70 && weight<=80){ cout<<"Letter Grade: C"; }
else{ cout<<"Letter Grade: F"; }
return 0;
}
Explanation:
See attachment for complete program where comments were used to explain difficult lines