include
include
#include <string>
#include <iomanip>
struct Student {
string name;
int scores[100];
int scoreCount;
double calculateAverage() {
int total = 0;
total += scores[i];
};
int totalItems;
int score;
while (true) {
cout << "Enter the score of " << students[i].name << ": ";
break;
} else {
cout << "Invalid score! Please enter a score between 0 and " << totalItems << ".\n";
<< students[i].calculateAverage()<<"%"<<endl;
string studentName;
cin.ignore();
getline(cin, studentName);
<< students[i].calculateAverage()<<"%"<<endl;
return;
int main() {
Student students[100];
int studentCount;
do {
cout << "Please enter the number of students to record (minimum 3 students): \n";
cin.ignore();
if (studentCount < 3) {
cout << "You need to enter at least 3 students. Please try again.\n";
getline(cin, students[i].name);
while (true) {
int choice;
switch (choice) {
case 1: {
cout << "1. View grades of one student.\n2. View grades of all the students.\n";
int option;
if (option == 1) {
oneStudent(students, studentCount);break;
} else if (option == 2) {
viewGrades(students, studentCount);
} else {
break;
case 2:
inputQuizScores(students, studentCount);
break;
case 3:
return 0;
default:
return 0;