Hassan
Hassan
#include <fstream>
#include <string>
struct Student {
string name;
float average;
};
void addStudent() {
Student s;
cin.ignore();
getline(cin, s.name);
file << s.name << "," << s.math << "," << s.english << "," << s.science << "," << s.average << endl;
file.close();
void viewRecords() {
ifstream file("results.txt");
string line;
file.close();
int main() {
int choice;
do {
switch (choice) {
return 0;