In: Computer Science
Write a C program that calculates a student grade in the C Programming Class. Ask the user to enter the grades for each one of the assignments completed in class:
The total of the quizzes count for a 30% of the total grade, the total of the projects counts for a 50% of the total class grade and the final test counts for the 20% left.
Thanks for the question. Below is the code you will be needing. Let me know if you have any doubts or if you need anything to change.
If you are satisfied with the solution, please leave a +ve feedback : ) Let me know for any help with any other questions.
Thank You!
===========================================================================
#include<stdio.h>
int main(void){
int quiz1, quiz2, quiz3, quizTotal;
int proj1, proj2, projTotal;
int finalTest;
double grade;
printf("Enter score in Quiz 1: ");scanf("%d",
&quiz1);
printf("Enter score in Quiz 2: ");scanf("%d",
&quiz2);
printf("Enter score in Quiz 3: ");scanf("%d",
&quiz3);
quizTotal = quiz1+quiz2+quiz3;
printf("Enter score in project 1: ");scanf("%d",
&proj1);
printf("Enter score in project 2: ");scanf("%d",
&proj2);
projTotal = proj1+proj2;
printf("Enter score in final test: ");scanf("%d",
&finalTest);
grade = quizTotal*0.3 + projTotal*0.5 +
finalTest*0.2;
printf("Final Grade: %.2f\n", grade);
}
======================================================================