i need help in adding the c++ code for the average mark, highest mark, lowest mark, number of students passing, using array
#include<iostream>
using namespace std;
int main()
{
int gradeRange [4]= {0,0,0,0};
int mark = 0;
int counter = 0;
while (mark < 101)
{
cin >> mark;
if (mark > 100)
break;
if (mark >= 70)
gradeRange [3] ++;
else if (mark >= 40)
gradeRange [2] ++;
else if (mark >= 30)
gradeRange [1] ++;
else
gradeRange [0] ++;
}
while (counter < 4)
{
if (counter == 0)
cout << "0 - 29 ";
else if (counter == 1)
cout << "30 - 39 ";
else if (counter == 2)
cout << "40 - 69 ";
else
cout << "70 - 100 ";
for ( int i = 1; i <= gradeRange [counter] ; i ++)
{
cout << "*";
}
counter ++;
cout << endl;
}
system("PAUSE");
}