본문 바로가기
프로그래밍/C_정보올림피아드 Language_Coder

CODE614 구조체 - 자가진단2

by Royal! 2020. 9. 24.
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
반응형

최근댓글

최근글

Royal! © 2024