Take student name Take his homework 1 homework2 homework 3 a

Take student name Take his homework 1, homework2, homework 3, and homework 4 grades. Take his quiz 1. quiz2. quiz 3, and quiz 4 grades Take his Midterm 1, and Midterm2 grades Take his final exam grade Calculate the average of homework. Calculate the average of quiz. Calculate the final exam grade: Output the final grade Output word \"Press \"if the grade equal and more the 60., and output word \"filled\" if the grade equal less then 60.

Solution

Code:

#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main(){
   string name;
   int h1,h2,h3,h4;
   int q1,q2,q3,q4;
   int m1,m2;
   int finalexam;
   float avgh, avgq,finalgrade;
   cout << \"Enter your name : \";
   cin >> name;
  
   cout << \"Enter your homework1 grade: \";
   cin >> h1;
   cout << \"Enter your homework2 grade: \";
   cin >> h2;
   cout << \"Enter your homework3 grade: \";
   cin >> h3;
   cout << \"Enter your homework4 grade: \";
   cin >> h4;
  
   cout << \"Enter your quiz1 grade: \";
   cin >> q1;
   cout << \"Enter your quiz2 grade: \";
   cin >> q2;
   cout << \"Enter your quiz3 grade: \";
   cin >> q3;
   cout << \"Enter your quiz4 grade: \";
   cin >> q4;
  
   cout << \"Enter your Midterm1 grade: \";
   cin >> m1;
   cout << \"Enter your Midterm2 grade: \";
   cin >> m2;
  
   cout << \"Enter your final exam grade: \";
   cin >> finalexam;
  
   avgh = (h1+h2+h3+h4)/4.0;
   avgq = (q1+q2+q3+q4)/4.0;
  
   finalgrade = avgh*0.10 + avgq*0.10+m1*0.20+m2*0.20+finalexam*0.40;
  
   cout << \"Student Name: \" << name << endl;
   cout << \"Final Grade: \" << finalgrade << endl;
  
   if(finalgrade >= 60){
       cout << \"Pass\" << endl;
   }else{
       cout<< \"Fail\" << endl;
   }
   return 0;
}

Output:

 Take student name Take his homework 1, homework2, homework 3, and homework 4 grades. Take his quiz 1. quiz2. quiz 3, and quiz 4 grades Take his Midterm 1, and
 Take student name Take his homework 1, homework2, homework 3, and homework 4 grades. Take his quiz 1. quiz2. quiz 3, and quiz 4 grades Take his Midterm 1, and

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site