Using C Language write a program: An instructor gives a multiple choice test which consists of 5 questions, each of which is answered by a choice of one of the numbers one to five. Write a program to call function TEST that accepts as input student name and the set of their test answers as one dimensional array. The program should grade the test. If the student choice is 1 give 1 point. If the choice is 2, give 2 points. 3 points if choice answer is 3 and 4 pints for answer 4 and choice 5 is 5 points. Otherwise no point is given to other choices. Print out the average score of the student in the test. SAMPLE RUN 1: INPUT : Enter student name : LYNNE Enter Answer # 1? 2 Enter Answer # 2? 3 Enter Answer # 3? 5 Enter Answer # 4? 5 Enter Answer # 5? 4 OUTPUT : LYNNE, your total score is 19 and your average score is 3.8. SAMPLE RUN 2: INPUT : Enter student name : ROSE Enter Answer # 1? 2 Enter Answer # 2? 3 Enter Answer # 3? 7 67 Enter Answer # 4? 5 Enter Answer # 5? 4 OUTPUT : ROSE, your total score is 14 and your average score is 2.8.
Using C Language write a program:
An instructor gives a multiple choice test which consists of 5 questions, each of which is
answered by a choice of one of the numbers one to five. Write a program to call function TEST
that accepts as input student name and the set of their test answers as one dimensional array.
The program should grade the test. If the student choice is 1 give 1 point. If the choice is 2, give
2 points. 3 points if choice answer is 3 and 4 pints for answer 4 and choice 5 is 5 points.
Otherwise no point is given to other choices. Print out the average score of the student in the
test.
SAMPLE RUN 1:
INPUT : Enter student name : LYNNE
Enter Answer # 1? 2
Enter Answer # 2? 3
Enter Answer # 3? 5
Enter Answer # 4? 5
Enter Answer # 5? 4
OUTPUT : LYNNE, your total score is 19 and your average score is 3.8.
SAMPLE RUN 2:
INPUT : Enter student name : ROSE
Enter Answer # 1? 2
Enter Answer # 2? 3
Enter Answer # 3? 7
67
Enter Answer # 4? 5
Enter Answer # 5? 4
OUTPUT : ROSE, your total score is 14 and your average score is 2.8.
Step by step
Solved in 2 steps with 1 images