1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define SIZE 3 struct student { int number; char name[20]; double grade; }; int main(void) { struct student list[SIZE]; int i; for (i = 0; i < SIZE; i++) { printf("ÇйøÀ» ÀÔ·ÂÇϽÿÀ: "); scanf("%d", &list[i].number); printf("À̸§À» ÀÔ·ÂÇϽÿÀ: "); scanf("%s", list[i].name); printf("ÇÐÁ¡À» ÀÔ·ÂÇϽÿÀ(½Ç¼ö): "); scanf("%lf", &list[i].grade); printf("\n"); } printf("\n=================================================\n"); for (i = 0; i < SIZE; i++) printf("Çйø: %d, À̸§: %s, ÇÐÁ¡: %f\n", list[i].number, list[i].name, list[i].grade); printf("=================================================\n"); return 0; } | cs |