Question: I need calculateStudentCourseGrade() function, code below. letter grades are AA is 4.00 and awarded for a grade 100 90, BA is 3.5 and awarded for
I need calculateStudentCourseGrade() function, code below.
letter grades are AA is 4.00 and awarded for a grade 100 90, BA is 3.5 and awarded for a grade 85 89, BB is 3.00 and awarded for a grade 84 80, CB is 2.50 and awarded for a grade 79 75, CC is 2.00 and awarded for a grade 74 70, DC is 1.50 and awarded for a grade 69 60, DD is 1.00 and awarded for a grade 59 50 and FF is 0.00 and awarded for a grade 49 0. The GPA must be between 0.00 to 4.00 and should always be displayed in the correct format.
#include
#define CLASSSIZE 35 // SINIFKAPASITE #define STUDENTNUMBERLENGTH 10 // OGRENCINUMARAUZUNLUGU #define NAMELENGTH 25 // ADIUZUNLUGU #define COURSENAMELENGTH 50 // DERSADIUZUNLUGU #define COURSECODELENGTH 10 // DERSKODUZUNLUGU #define COURSESREGISTERED 5 // KAYITLIDERSLER #define MID.TERMWEIGHT 30 // VIZEAGIRLIK #define FINALWEIGHT 30 // FINALAGIRLIK #define QUIZWEIGHT 20 // QUIZAGIRLIK #define HOMEWORKWEIGHT 20 // ODEVAGIRLIK typedef struct fullName{ //tam adi char *name; //adi char *surname; //soyadi }name_t;
typedef struct examGrades{ //exx not double mid_term; //vize double final; //final double quiz; //quiz double homework; }grades_t; typedef struct courseRegistered{ char courseName[COURSENAMELENGTH]; char courseCode[COURSECODELENGTH]; grades_t grades; char letterGrade[2]; double numericGrade; }courseReg_t;
typedef struct studentInfo{ name_t studentName; char *stNo; courseReg_t *courses[COURSESREGISTERED]; double gpa; }student_t;
typedef struct courseInfo{ char courseName[COURSENAMELENGTH]; char courseCode[COURSECODELENGTH]; student_t students[CLASSSIZE]; double courseAverage; }courses_t;
int main(){
course_t courseClass //we need to use this return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
