uhm... i really need your help about this... below is the problem but i have my own turbo C code. and the problem in my code is that i cannot total and average the scores that i restore in my arrays...
write a program that will process the exam scores of students in a exam.here are the requirements:
-the program should ask for a student name followed by the 4 exam scores(percentage) of the student. do this for 15 students.
-store the student names in a two-dimensional array. another two-dimensional array must also be used to store exam scores.
-calculate the final score of each student computed as:
...exam 1 is 20%
...exam 2 is 20%
...exam 3 is 30%
...exam 4 is 30%
-calculate the average of the entire class (average of the individual student final score)
-for each student,display name,exam scores,final score with it's letter grade equivalent.
letter grade Final score
A 91-100
B 81-90
C 71-80
D 61-70
F 60 below
here is my code...i cannot total and average the scores that i restore in my arrays...hope that you can help me..
#include<stdio.h>
#define MAXSTUDENTS 15
#define EXAMS 4
main(){
char name[20];
int x[MAXSTUDENTS][EXAMS],grade,total,row,col;
float ave;
clrscr();
for(row=0;row<MAXSTUDENTS;row++){
printf("\nEnter First name : ");
scanf("%s",name);
for(col=0;col<EXAMS;col++){
printf("\nExam score : ");
scanf("%d",&grade);
total+=grade[row][col];
}
ave=total/EXAMS;
}
if (ave>91) printf("A");
if (ave>=81 && ave<=90) printf("B");
if (ave>=71 && ave<=80) printf("C");
if (ave>=61 && ave<=70) printf("D");
if (ave<=60) printf("F");
getch();}
i hope that you can help me until tomorrow 11.59(jan. 22)... i do really appreciate your helps...sorry for the urgent demand...:X