SEMM 1013 - Project 1 - Wan Abdul Hadi
SEMM 1013 - Project 1 - Wan Abdul Hadi
SEMM 1013 - Project 1 - Wan Abdul Hadi
PROJECT 1
ANSWER:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NAME 35
#define ID 10
int main(void)
float test[3];
float hw[4];
float prj[1];
exit(1);
char buffer[MAX_LENGTH];
while (fgets(buffer, MAX_LENGTH, file_in) != NULL)
line == 0;
char name[NAME];
char id[ID];
fmark =
((test[1]/5)+(test[2]/5)+(test[3]/5))+((hw[1]+hw[2]+hw[3]+hw[4])/(4))+((prj[1])/(3.333333
33333333));
fprintf(file_out, "A+\n");
fprintf(file_out, "A\n");
fprintf(file_out, "A-\n");
fprintf(file_out, "B+\n");
}
fprintf(file_out, "B\n");
fprintf(file_out, "B-\n");
fprintf(file_out, "C+\n");
fprintf(file_out, "C\n");
fprintf(file_out, "C-\n");
fprintf(file_out, "D+\n");
fprintf(file_out, "D\n");
fprintf(file_out, "D-\n");
else
fprintf(file_out, "E\n");
line++;
fclose(file_in);
fclose(file_out);
return 0;