im doin an assignment where these statements r required
MENU
1. Enter the id & four subject marks
2. Calculate the total and average
3. Calculate grade
4. Print the grade wise
5. Print GRADE SHEET
6. Terminate the program
so far i manage to come up with this and yet there is still error to it
#include <stdio.h>
main(void)
void data_entry (int [], float [])
void calculate_grade (char [])
{
int choice; int id[10]; float s1[10]; char grade[10];
do{
printf ("1. Enter ID & 4 Subject mark\n");
printf ("3. Calculate the grade\n");
printf ("6. Terminate the program\n");
scanf ("%d", & choice);
switch (choice) {
case 1 : data_entry (id,s1); //function call
break;
case 3 : calculate_grade (grade); //function call
break;
}
}while (choice !=6);
return 0;
}
//Function for data_entry
void data_entry (int t_id[], float t_s1[]);
{
int i;
printf ("Enter 10 student ID & 1 Subject mark\n");
for (i=0;i<10;i++) {
scanf ("%d%f", t_id[i], t_s1[i]);
}
//Function to calculate grade
void calculate_grade (float t_s1[], char t_grade[]);
{
int i;
for (i=0;i<10;i++){
if (t_s1[i] >=50)
t_grade[i] = 'F';
else if ((t-s1[i]>=50)&&(t_s1[i]<60))
t_grade[i] = 'C';
else if ((t_s1[i]>=60)&&(t_s1[i]<75))
t_grade[i] = 'B'
else if (t_s1[i]>=75)
t_grade[i] = 'A'
}
return;
}
what's wrong and what's missing here? plz help, desperately need to understand.... thanks