This commit is contained in:
암냥 2026-03-31 09:16:35 +09:00
commit 7f76e58e1e
No known key found for this signature in database
10 changed files with 150 additions and 5 deletions

21
02/02_56p.c Normal file
View file

@ -0,0 +1,21 @@
#include <stdio.h>
#include <string.h>
int main() {
char name[100];
char school[100];
char department[100];
printf("이름 : ");
scanf("%s", name);
getchar(); // consume newline
printf("학교 : ");
fgets(school, sizeof(school), stdin);
school[strcspn(school, "\n")] = '\0'; // remove newline from school
printf("학과 : ");
scanf("%s", department);
printf("%s\n%s\n%s님 안녕하세요?\n", school, department, name);
return 0;
}