From 5dee97aa6ebab99ceb9718acfa515817a2fb11ee Mon Sep 17 00:00:00 2001 From: juan Date: Mon, 20 Dec 2021 23:30:33 +0800 Subject: [PATCH] Try to code on my pad lol --- semester1/pset14/2-4-database.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/semester1/pset14/2-4-database.c b/semester1/pset14/2-4-database.c index 870d416..421721b 100644 --- a/semester1/pset14/2-4-database.c +++ b/semester1/pset14/2-4-database.c @@ -110,7 +110,7 @@ void update(char *id, int *scores, STUDENT *students, int size) { // 3 int loc = match(id, students, size); if (loc == -1) { printf("Students do not exist\n"); - return; + return; } // Update the student @@ -124,13 +124,13 @@ void display(char *id, STUDENT *students, int size) { // 4 int loc = match(id, students, size); if (loc == -1) { printf("Students do not exist\n"); - return; + return; } // Display the average score int sum = 0; for (int i = 0; i < CLASS; i++) { - /* printf("score[%d]: %d\n", i, students[loc].scores[i]); */ + /* printf("score[%d]: %d\n", i, students[loc].scores[i]); */ sum += students[loc].scores[i]; } printf("Student ID:%s\nName:%s\nAverage Score:%.1f\n", id, students[loc].name,