diff --git a/cv10/program.c b/cv10/program.c index ae7708c..7648cbc 100644 --- a/cv10/program.c +++ b/cv10/program.c @@ -28,6 +28,9 @@ int main() { int i, found = 0; + // Remove the newline character from the temp_name array + temp_name[strcspn(temp_name, "\n")] = '\0'; + for (i = 0; i < num_accepted; i++) { if (strcmp(names[i], temp_name) == 0) { found = 1; @@ -59,4 +62,4 @@ int main() { } return 0; -} +} \ No newline at end of file