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

Create a C program not C++ that calculates homeworks, projects and exam scores i

ID: 3541107 • Letter: C

Question

Create a C program not C++ that calculates homeworks, projects and exam scores into a final average grade for the class.

Here is a sample output:

Welcome to grade calculation program. This
program will calculate the final average and course
grade. Each homework is worth 4%, each project is worth 8% and each exam is
worth 20%.

Enter the homework 1 score: 100
Enter the homework 2 score: 80
Enter the homework 3 score: 100
Enter the homework 4 score: 75
Enter the project 1 score: 75
Enter the project 2 score: 90
Enter the project 3 score: 99
Enter the exam 1 score: 92
Enter the exam 2 score: 80
Enter the exam 3 score: 81


With an average of 85.92, your course grade is a B.

Thank you for using the grade calculation program!

Here is another sample output:

Welcome to the CMSC104 grade calculation program. This
program will calculate the final average and course
grade for a student in CMSC104. Each homework is
worth 4%, each project is worth 8% and each exam is
worth 20%.

Enter the homework 1 score: 100
Enter the homework 2 score: 50
Enter the homework 3 score: 75
Enter the homework 4 score: 95
Enter the project 1 score: 75
Enter the project 2 score: 70
Enter the project 3 score: 75
Enter the exam 1 score: 80
Enter the exam 2 score: 70
Enter the exam 3 score: 65


With an average of 73.40, your course grade is a C.

Thank you for using the grade calculation program!

Explanation / Answer

please rate -thanks


if you don't normally use getch() and include<conio.h> just get rid of them


didn't know what you've learned, so any changes needed let me know, I'll make them, but may not be until the morning

#include <stdio.h>
#include <conio.h>
int main()
{int grade;
int i;
double sum=0,num,score;
char letter;
printf("Welcome to grade calculation program. This ");
printf("program will calculate the final average and course ");
printf("grade. Each homework is worth 4%%, each project is worth 8%% and each exam is ");
printf("worth 20%%. ");
for(i=1;i<=4;i++)
{printf("Enter the homework %d score: ",i);
scanf("%d",&grade);
sum=sum+(grade*.04);
}
for(i=1;i<=3;i++)
{printf("Enter the project %d score: ",i);
scanf("%d",&grade);
sum=sum+grade*.08;
}
for(i=1;i<=3;i++)
{printf("Enter the exam %d score: ",i);
scanf("%d",&grade);
sum=sum+grade*.2;
}
num=sum*10;
if(num>=5)
score=sum+1;
else
score=sum;
if(score>=90)
letter='A';
else if(score>=80)
letter='B';
else if(score>=70)
letter='C';
else if(score>=60)
letter='D';
else
letter='F';
printf(" With an average of %.2f, your course grade is a %c. ",sum,letter);

printf("Thank you for using the grade calculation program!");
getch();
return 0;

}