Files
shipthatcode-c/main.c
T
2026-10-03 20:32:17 +02:00

18 lines
505 B
C

#include <stdio.h>
#include <string.h>
int main(void) {
/* Already done for you: read one line of text into name and drop the
Enter key from its end. The Strings lesson explains how this works. */
char name[256] = "";
if (fgets(name, sizeof name, stdin) == NULL) {
name[0] = '\0';
}
name[strcspn(name, "\r\n")] = '\0';
/* TODO: print the two lines described in the exercise.
Use a %s placeholder for name; do not type any name yourself. */
return 0;
}