Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- #define size 50
- struct student
- {
- char name[30];
- int num;
- int sub[3];
- };
- int main()
- {
- int i, j, n,sum,s[size],max;
- struct student st[size];
- char c;
- printf("so luong student la ");
- scanf_s("%d", &n);
- for (i = 1;i <= n;i++)
- {
- printf("%d.ten va ma sinh vien: ", i);
- gets_s(st[i].name);
- //while (getchar() != '\n')
- scanf_s("%d", &st[i].num);
- }
- for (i = 1;i <= n;i++)
- {
- for (j = 1;j <= 3;j++)
- {
- printf("SV %d co diem cho mon hoc thu %d la ", i, j);
- scanf_s("%d", &st[i].sub[j]);
- }
- }
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment