Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I Need help with modifying a C program, Modify the grade book program from code below to use a custom struct to hold the student's

I Need help with modifying a C program,

Modify the grade book program from code below to use a custom struct to hold the student's ID number and the percentage score for each item in the grade book. The program should accept the entry of ID numbers and percentage grades (0100) until the user signals that he or she is done entering grades. The program should then print out the ID numbers and grades entered by the user, sorted by ID number. This needs be format the code properly and provide comments in the C code.

Additionally,

To have a clear picture of what the program should do and the steps in the process for reaching the desired result. can you please writ in plain English what the program needs to do and describe the steps in the process to solve the problem. I would like a clear explanation of the process of solving the problem, not writing C.

Code below to be modified:

#include //declare a max grade count constant of 300 #define MAX_GRADE_COUNT 300

int main(void){ //declare an array called grade as integers int grade[MAX_GRADE_COUNT]; int i; //loop variable int count = 0; char continueResponse; for(i = 0; i < MAX_GRADE_COUNT; i++){ printf("Enter grade (0-100): "); scanf("%d", &grade[i]); count++; printf("Continue entering grades? (Y/N): "); scanf(" %c", &continueResponse); if(continueResponse == 'N'||continueResponse == 'n'){ printf(" == End of Grade Entry == "); break; } }//end of the for loop printf("Grades Entered are: "); for(i = 0; i < count; i++){ //print with padded on the left by using 3 digits wide printf("%3d ", grade[i]); } return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

7. Where Do We Begin?

Answered: 1 week ago

Question

3. Are our bosses always right? If not, what should we do?

Answered: 1 week ago