2020. 1. 3. 15:48
#include#include typedef struct{ int year; int month; int date; }birthday; typedef struct { float korean; float english; float mean; }GRADE; typedef struct{ char name[30]; birthday birth; char id[10]; GRADE grade; char tell[10]; }stu_grade; int main() { stu_grade student = {"kim", {2003, 9, 28}, "4004", {90,80,0}, "123-4567"}; printf("%s %d %d %d %s %f %f %f %s",student.name, student.birth.year,student.birth.month, student.birth.date,student.id,student.grade.korean,student.grade.english, student.grade.mean,student.tell); return 0; }
'c언어' 카테고리의 다른 글
bubble sort (0) | 2020.01.03 |
---|---|
포인터 사용 예제2 (0) | 2020.01.03 |
포인터 사용 예제 (0) | 2020.01.03 |
RR(round-robin) 스케줄링 구현 (0) | 2019.02.10 |
메뉴선택 (0) | 2019.01.25 |