0 Anonymous Asked: September 25, 20202020-09-25T00:00:35+05:30 2020-09-25T00:00:35+05:30In: Computer Science Write a C program to create a University Grade Card for Semester III for student using structure. 0 Write a C program to create a University Grade Card for Semester III for student using structure. bcac programc program structuremcamcs-011 1 Answer Voted Oldest Recent admin 2020-09-26T08:56:34+05:30Added an answer on September 26, 2020 at 8:56 am #include struct student { char name[50]; int roll; float marks; int bcs011, bcs012, bcsl013, eco01, feg02; int bcs011_assign, bcs012_assign, bcsl013_assign, eco01_assign, feg02_assign; }; int main(void) { struct student s[20]; for (int i = 0; i < 20; i++) { printf("\n***** Enter information of student %d *****\n", i+1); printf("Name of the student: "); scanf("%s",s[i].name); printf("Roll number: "); scanf("%d", &s[i].roll); printf("\n\n***Enter Term End Theory Matks***\n\n"); printf("BCS-011 marks: "); scanf("%d", &s[i].bcs011); printf("BCS-012 marks: "); scanf("%d", &s[i].bcs012); printf("BCSL-013 marks: "); scanf("%d", &s[i].bcsl013); printf("ECO-01 marks: "); scanf("%d", &s[i].eco01); printf("FEG-02 marks: "); scanf("%d", &s[i].feg02); printf("\n\n***Enter Assignment Matks***\n\n"); printf("BCS-011 marks: "); scanf("%d", &s[i].bcs011_assign); printf("BCS-012 marks: "); scanf("%d", &s[i].bcs012_assign); printf("BCSL-013 marks: "); scanf("%d", &s[i].bcsl013_assign); printf("ECO-01 marks: "); scanf("%d", &s[i].eco01_assign); printf("FEG-02 marks: "); scanf("%d", &s[i].feg02_assign); } for (int i = 0; i < 20; i++) { printf("\n*****Displaying Grade Card Data*****\n"); printf("Name : %s \t", s[i].name); printf("Roll number: %d \n",s[i].roll); printf("Subjects :\t"); printf("BCS-011 \t"); printf("BCS-012 \t"); printf("BCSL-013 \t"); printf("ECO-01 \t"); printf("\tFEG-02 \n"); printf("Assignment :\t"); printf("%d \t\t", s[i].bcs011_assign ); printf("%d \t\t", s[i].bcs012_assign ); printf("%d \t\t", s[i].bcsl013_assign ); printf("%d \t\t", s[i].eco01_assign ); printf("%d \n", s[i].feg02_assign ); printf("Theory :\t"); printf("%d \t\t", s[i].bcs011 ); printf("%d \t\t", s[i].bcs012 ); printf("%d \t\t", s[i].bcsl013 ); printf("%d \t\t", s[i].eco01 ); printf("%d \n", s[i].feg02 ); printf("Total :\t\t"); printf("%.2f \t\t", (s[i].bcs011 * 0.75) + (s[i].bcs011_assign * 0.25) ); printf("%.2f \t\t", (s[i].bcs012 * 0.75) + (s[i].bcs012_assign * 0.25) ); printf("%.2f \t\t", (s[i].bcsl013 * 0.75) + (s[i].bcsl013_assign * 0.25) ); printf("%.2f \t\t", (s[i].eco01 * 0.70) + (s[i].eco01_assign * 0.30) ); printf("%.2f \n", (s[i].feg02 * 0.70) + (s[i].feg02_assign * 0.30) ); } } 0 Reply Share Share Share on Facebook Share on Twitter Share on LinkedIn Share on WhatsApp Leave an answerLeave an answerCancel reply Featured image Select file Browse Answer Anonymously Save my name, email, and website in this browser for the next time I comment. Δ
1 Answer