Write an interactive C program that will accept each student’s name an exam grades as input, determine an average grade for each student, and then display the student’s name, the individual exam grades and the calculated average.

The program should allow for unequal weigthing for the individual exam grades. In particular, assume that each of the first four exams contributes 15 percent to the final score, and each of the last two exams contributes 20 percent.
A class of students earned the following grades for the five examinations taken in a C programming course.
No Name Exam Scores (percent)
Ahmad
90
85
88
70
84
95
Chong Wei Wei
98
87
97
90
88
85
Muthu
88
87
90
95
78
92
Elizabeth
66
70
54
50
70
61
Julia
74
85
60
57
71
75
Siti
80
75
68
77
60
79
Wong Ah Seng
56
68
78
80
55
88
Hemalata
78
65
74
80
70
82
Alexander
50
45
55
60
70
45
Awang
60
55
42
50
60
55

I must say, you got a lotta nerve. Don't expect anyone to write this for you. But we will take a look at what you have.

On the other hand, the compiler will do that for you, and simply running your code will verify its function.

A bare-bones version of this cannot be more than two or three dozen lines of code.

There are oodles of online documentation if you can't figure out which C++ routines to use.

#include "stdafx.h"

#include <iostream>
#include <iomanip>
#include <string>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
const int number of students = 10;
const int number of scores = 6;
double scores[number of scores];
double total;
double average;

string name[number of students] = {"Ahmad", "Chong Wei Wei", "Muthu", "Elizabeth", "Julia", "Siti", "Wong Ah Seng", "Hemalata", "Alexander", "Awang"};
double grades[number of students][number of scores] = {{90,85,88,70,84,95},{98,87,97,90,88,85},{88,87,90,95,78,92},{66,70,54,50,70,61},{74,85,60,57,71,75},{80,75,68,77,60,79},{56,68,78,80,55,88},{78,65,74,80,70,82},{50,45,55,60,70,45},{60,55,42,50,60,55}};

cout <<"Student's Name Grade\n";
cout <<"------------"<< setw(14) << "-------\n";

for (int student = 0; student < number of students; student++)
{
total = 0;

for (int col = 0; col < number of scores; col++)
total += scores[student][col];
average = total / number of scores;
cout << setw(9) << left << name[student];
cout << setw (14) << right << average << endl;
}

int BestStudent = 0;

if(scores[i][j] > highest)
{
highest = scores[i][j];
BestStudent = i;
}

cout << "The student with the highest average is" << name[BestStudent] << "and the average is" << higest << endl;
}
How to solve this problem???
fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory

To write the interactive C program that will accept each student's name and exam grades as input, determine an average grade for each student, and display the student's name, individual exam grades, and the calculated average, you can follow these steps:

1. Start by including the necessary header files for input/output operations and string handling:

```c
#include <stdio.h>
#include <string.h>
```

2. Define the maximum number of students and exams using preprocessor directives:

```c
#define MAX_STUDENTS 10
#define MAX_EXAMS 6
```

3. Create a structure to represent a student, including their name and exam grades:

```c
typedef struct {
char name[50];
int examGrades[MAX_EXAMS];
} Student;
```

4. Define a function to calculate the average grade for a student based on the given weights:

```c
float calculateAverage(int examGrades[], int numExams) {
// Initialize the weights for each exam
float weights[MAX_EXAMS] = {0.15, 0.15, 0.15, 0.15, 0.20, 0.20};

float totalGrade = 0;

// Calculate the weighted sum of exam grades
for (int i = 0; i < numExams; i++) {
totalGrade += examGrades[i] * weights[i];
}

return totalGrade;
}
```

5. Write the main function to accept input for each student's name and exam grades, calculate the average, and display the results:

```c
int main() {
Student students[MAX_STUDENTS];
int numStudents;

// Prompt the user to enter the number of students
printf("Enter the number of students: ");
scanf("%d", &numStudents);

// Input student details for each student
for (int i = 0; i < numStudents; i++) {
printf("\nEnter details for student %d:\n", i + 1);

// Input student name
printf("Name: ");
scanf(" %[^\n]s", students[i].name);

// Input exam grades
printf("Exam Scores (percent):\n");
for (int j = 0; j < MAX_EXAMS; j++) {
printf("Exam %d: ", j + 1);
scanf("%d", &students[i].examGrades[j]);
}
}

// Display student details and average grades
printf("\nStudent Details and Average Grades:\n");
for (int i = 0; i < numStudents; i++) {
printf("\nName: %s\n", students[i].name);
printf("Exam Scores: ");
for (int j = 0; j < MAX_EXAMS; j++) {
printf("%d ", students[i].examGrades[j]);
}
printf("\nAverage Grade: %.2f\n", calculateAverage(students[i].examGrades, MAX_EXAMS));
}

return 0;
}
```

6. Compile and run the program. You can copy and paste the provided student data into the program when prompted to enter the student details.

The program will then display each student's name, individual exam grades, and the calculated average grade based on the given weights for each exam.