diff --git a/a1/program.c b/a1/program.c index dd34e0d..4d9939d 100644 --- a/a1/program.c +++ b/a1/program.c @@ -59,6 +59,7 @@ int main() char str[128]; fgets(str,100,stdin); + if(str[strlen(str)-1]=='\n') { str[strlen(str)-1]='\0';} printf("Read: %s", str); int i=0;