Question: Instructions: Modify the grade book program from Assessment 3 to use a custom struct to hold the student's ID number and the percentage score for

Instructions:

Modify the grade book program from Assessment 3 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. Again, be sure to format the code properly and provide comments in the C code. _____________________________________________________ My problem(s): Errors: |43|warning: assignment makes integer from pointer without a cast [enabled by default]| |44|warning: assignment makes integer from pointer without a cast [enabled by default]| |46|error: incompatible types when assigning to type 'int[100]' from type 'int *'| |47|error: incompatible types when assigning to type 'int[100]' from type 'int *'| |49|error: incompatible types when assigning to type 'int[100]' from type 'int'| |50|error: incompatible types when assigning to type 'int[100]' from type 'int'| _____________________________________________________ Problem(2): This is an alteration of other assisted codes provided. Please note 1 very important point- I do not want to ask the user to enter anything BUT the ID 1st, if the ID is -1 (user indicated quit), then break, or else enter Grade. Then SORT on ID number.

Here is my code: #include #include

struct student { int id[100]; int per[100]; }s[100];

int main() { int x, a=0, ctr; int n;

printf("Grades Entered");

for(x=0;x<100;x++) { printf("Enter ID Number: "); scanf("%d", &s[ctr].id); { if(ctr !=-1) { printf("Enter Grade: "); scanf("%d", &s[ctr].per); } if(ctr==-1) { break; } } }

int tId, tPer; int i=0, j=0;

for(i=0;i s[j].id) { tId= s[i].id; tPer= s[i].per;

s[i].id= s[j].id; s[i].per= s[j].per;

s[j].id= tId; s[j].per= tPer; } } printf(" Student ID\tGrade");

for(i=0;i

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!