Hi guys,
I'm having a little difficulty and kind of stuck writing this particular code for a grade calculator project. I'm using linux OS.
So far, i have:
#include <stdio.h>
int man()
{
int my grade; /* user's grade */
printf ("welcome....." );
printf("Enter HW1 score (out of 100");
printf("Enter HW2 score (out of 100");
printf("Enter HW3 score (out of 100");
printf("Enter Proj1 score (out of 100");
printf("Enter Proj2 score (out of 100");
printf("Enter Proj3 score (out of 100");
printf("Enter Proj4 score (out of 100");
printf("Enter Exam1 score");
printf("Enter Exam2 score");
printf("Enter Exam3 score");
Then im stuck. My question is, lets say i give the avg score of HW= A, and Proj = B and Exam= C. Given that HW= 12% of grade, Proj=28% and Exam=60%. So final equation is: (A x .12) + (B x .28) + (C x .60) = Final Grade.
-How can i input that equation into the code inorder for it to compile and give me that final grade?
-Are there any necessary loops to use?
I extremely appreciate your help. Thanks.
I'm having a little difficulty and kind of stuck writing this particular code for a grade calculator project. I'm using linux OS.
So far, i have:
#include <stdio.h>
int man()
{
int my grade; /* user's grade */
printf ("welcome....." );
printf("Enter HW1 score (out of 100");
printf("Enter HW2 score (out of 100");
printf("Enter HW3 score (out of 100");
printf("Enter Proj1 score (out of 100");
printf("Enter Proj2 score (out of 100");
printf("Enter Proj3 score (out of 100");
printf("Enter Proj4 score (out of 100");
printf("Enter Exam1 score");
printf("Enter Exam2 score");
printf("Enter Exam3 score");
Then im stuck. My question is, lets say i give the avg score of HW= A, and Proj = B and Exam= C. Given that HW= 12% of grade, Proj=28% and Exam=60%. So final equation is: (A x .12) + (B x .28) + (C x .60) = Final Grade.
-How can i input that equation into the code inorder for it to compile and give me that final grade?
-Are there any necessary loops to use?
I extremely appreciate your help. Thanks.
Comment