So, I got this one question from my lecturer and it kinda confused me. Can anyone actually solve this out?
Write a C++ program to do the following :
PROBLEM
• Compute and display the average marks for a number of students where the number of marks and students are given by the user.
• Display the highest average mark and the lowest average mark.
and the example of the output is:
“Welcome into this page”
Do you want to continue this program?
Press y for yes or otherwise for no: y
Enter the number of students: 2
Enter the number of marks: 3
For student 1
Enter mark 1: 75
Enter mark 2: 89.5
Enter mark 3: 64.5
The average mark is 76.33
For student 2
Enter mark 1: 90
Enter mark 2: 80
Enter mark 3: 65
The average mark is 78.33
The highest average mark is 78.33 and the lowest average mark is 76.33
Do you want to continue this program?
Press y for yes or otherwise for no: n
Thank you for using this application!
This is what I've done so far:
#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
int main ()
{
char letter, y, n;
double student, mark;
cout<< "Welcome to this application."<<endl;
cout<< "Do you want to continue this program?"<<endl;
cout<< "If yes, enter y. If no, enter n."<<endl;
cin>> letter;