Week 4 In-Class Examples
#include <iostream>
using namespace std;

//--------------------------------------------
// Programmer: Scott Marino
// A simple to program to prompt for grades
// and calculate the average.
//--------------------------------------------
int main (void)
{
   float midterm_grade = 90;
   float final_grade = 99;
   float final_average;

   cout << "What is the midterm grade? ";
   cin >> midterm_grade;

   cout << "What is the final exam grade? ";
   cin >> final_grade;

   cout << "The midterm grade was " << midterm_grade << endl;
   cout << "The final exam grade was " << final_grade << endl;
   final_average = (midterm_grade + final_grade) / 2.0;
   cout << "The final average is " << final_average << endl;

   return 0;
}