Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The program will grade a series of exams and then print a grade report for stude

ID: 3688190 • Letter: T

Question

The program will grade a series of exams and then print a grade report for students in a course Input: An instructor has a class of students each of whom takes a multiple-choice exam with 10 questions. For each student in the class, there is one line in the input file. The line contains the answers that student gave for the exam. The input file named "grade_ data.txt" will have the following format: line 1: the key for the exam (e.g.) lines 2-n bccbbbdbbb bccbbadbbb etc a set of answers. You know you are done when you get to a line with no data. Note: You will not know in advance how many exams you have to grade and you don't need to store the exam answers in your program Processing: The program is to read the input file and grade each exam and print out the score for that exam. You will also keep track of how many students earned each score (0-10) and print a report after the grading Output: Here is an example of how the output might appear. You will write the report to an output file named "grade_report.txt" student 1-8 student 2-10 student 3-1 etc Final Report 104 high score- 10 low score - 1 mean score-6.25

Explanation / Answer

#include <stdio.h>
int main(void){
int num;
printf("Enter your mark ");
scanf("%d",&num);
printf(" You entered %d", num); // printing outputs

if(num >= 80){
printf(" You got A grade"); // printing outputs
}
else if ( num >=60){ // Note the space between else & if
printf(" You got B grade");
}
else if ( num >=40){
printf(" You got C grade");
}

else if ( num < 40){
printf(" You Failed in this exam");
}
return 0;
}

--------------------------------------------------------------------------------------------------------------------------------------

# include <stdio.h>

float verify (float a)
{

float output;


if (a>=80)
{
output=4;

}

else if (a>=75 && a<=79){

output= 3.75;

}
else if (a>=70 && a<=74){

output= 3.5;

}
else if (a>=65 && a<=69){

output= 3.25;

}
else if (a>=60 && a<=64){

output= 3.0;

}
else if (a>=55 && a<=59){

output= 2.5;

}

else if (a>=50 && a<=54){

output= 2.0;

}
else if (a>=40 && a<=49){

output= 1.0;

}

else
{ output= 0.0;}

return output;

}

int main ()

{
a:
float number ;
printf("Please Enter the course result marks: ");

scanf("%f", &number);


printf("The GPA is: %f", verify (number));


return 0;
goto a;

}