http://imgur.com/A3X8CWn Please help me correct my program or write one that i can edit SOURCE CODE:

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Order a Similar Paper HERE Order a Different Paper HERE

http://imgur.com/A3X8CWn Please help me correct my program or write one that i can edit

SOURCE CODE:

/*
Donald Krambeck
Homework 4
My program inputs the values of the grade[] array,
and calculates the total and avarage. It then displays
the value of the total, average, and the grades.
*/

#include <iostream>
using namespace std;

int main()
{
   double grade[100]; //double data type array
   double total = 0, avg = 0; // double data type variables
   int i, count = 0; //int data type array

   cout << ” Please enter the values of grades ” << endl; //display output

   for (i = 0; grade[i]; != ‘’; i++) //loop to input values
   {
       cin >> grade[i];
   }

   if (grade[i] > 0) //condition to check negative values
   {
       total = total + grade[i]; //counts total of grades

       count++; //increase the counter by one
   }
   else
   {
       break; //break from loop
   }
  
   avg = total / count; //calculates the average

   cout << ” The total of all the grades is ” << total << endl;
   cout << ” The average of all the grades is ” << avg << endl;
   cout << “The grades below average are ” << endl;

   for (i = 0; i < count; i++) //loop to find grades below average
   {
       if (grade[i] < avg) //condition to find grades below average
       {
           cout << ” * ” << grade[i] << endl;
       }
   }
  
   for (i = 0; i < count; i++) //find equivalent letter for the grade
   {
       if (grade[i] < 60) //find equivalent letter for the grade
       {
           cout << grade[i] << ” = F ” << endl;
       }
       else if (grade[i] >= 60 && grade[i] < 70) //find equivalent letter for the grade
       {
           cout << grade[i] << ” = D ” << endl;
       }
       else if (grade[i] >= 70 && grade[i] < 80) //find equivalent letter for the grade
       {
           cout << grade[i] << ” = C ” << endl;
       }
       else if (grade[i] >= 80 && grade[i] < 90) //find equivalent letter for the grade
       {
           cout << grade[i] << ” = B ” << endl;
       }
       else if (grade[i] >= 90 && grade[i] < 100) //find equivalent letter for the grade
       {
           cout << grade[i] << ” = A ” << endl;
       }
   }
   return 0;
}