Write a program that first print the student’s marks data given in the attached excel file then show the
horizontal bar chart of the grades frequency which student achieved and in the last tell us which grade
category got maximum and minimum number of students.
Here is program:
int main()
{
const int size = 25;
string studentnames[size];
double studentsmarks[size];
for (int j = 0; j < size; j++)
{
cout << "Enter student name:" << endl;
cin >> studentnames[j];
}
for (int i = 0; i < size; i++)
{
cout << "Enter student mark:" << endl;
cin >> studentsmarks[i];
}
for (int r = 0; r < size; r++)
{
int max = studentsmarks[0];
if ((studentsmarks[0] > studentsmarks[r + 1]) && (studentsmarks[r] > max))
{
max = studentsmarks[r];
cout << "In " << r + 1 << "greatest student - " << max << endl;
}
}
}
Comments
Leave a comment