Answer to Question #310450 in C++ for Bilal

Question #310450

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.

1
Expert's answer
2022-03-12T18:05:10-0500

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;
        }
    }
    
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment