im not sure how to do it.... im not sure how to continue it...
"as each number inputs, add the number to total..." i thinnk i have that part... but after the total is done, calculate the average, then use the average to determine the deviation of each value from the average. then store each deviation in an array name deviation....
CODE
#include <iostream>
using namespace std;
int main()
{
const int num= 14;
int i;
int grade[num];
int total= 0;
int deviation;
int average;
for (i=0; i<num; i++)
{
cout<<" Enter a grade";
cin>> grade[i];
}
cout<<" The total number of grades :";
for (i=0; i<14; i++)
{
cout<<" "<<grade[i];
total= total+grade[i];
}
cout<<"is"<< total<endl;
return 0;
}
This post has been edited by jayman9: 3 Sep, 2008 - 05:18 PM