728x90
반응형
# include <stdio.h>
typedef struct Student{
char school_name[21];
int grade;
}Student;
int main()
{
Student a1 = {"Jejuelementary",6};
Student a2;
scanf("%s %d",a2.school_name,&a2.grade);
printf("%d grade in %s School\n",a1.grade,a1.school_name);
printf("%d grade in %s School\n",a2.grade,a2.school_name);
return 0;
}
728x90
반응형
'프로그래밍 > C_정보올림피아드 Language_Coder' 카테고리의 다른 글
CODE 619 포인터 - 자가진단1 (0) | 2020.10.05 |
---|---|
CODE615 :구조체-자가진단 3 (0) | 2020.09.25 |
CODE613 구조체 - 자가진단 1 (0) | 2020.09.22 |
CODE593 문자열1- 자가진단 1 (0) | 2020.09.21 |
CODE 571~574 함수1 - 자가진단1~4 (0) | 2020.09.13 |