#include <stdio.h>
#define N_STUDENTS 3
#define N_SUBJECTS 5
int main(void)
{
int i,j;
int score[ ][ ];
printf("Enter the scores of 3 students in the order of subjects\n");
printf("Eng. Math. Sci. Jpn. Soc.\n");
for(i=0;i< ; i++){
printf("No.%d\n", );
for(j=0;j< ; j++){
scanf("%d", );
}
}
printf("Below is the list of the scores of the three students in order of subject.\n");
/* 12345678 12 123 123 12*/
printf(" Eng. Math. Sci. Jpn. Soc.\n");
for(i=0;i ; i++){
printf("No.%d:",i+1);
for(j=0;j ; j++){
printf("%6d",score[i][j]);
if(j== ) printf("\n");
else printf(",");
}
}
return 0;
}
実行結果が以下のようになるようにしたいです。
Enter the scores of 3 students in the order of subjects
Eng. Math. Sci. Jpn. Soc.
No.1
85
76
77
92
79
No.2
78
73
87
66
80
No.3
89
71
68
70
75
Below is the list of the scores of the three students in order of subject.
Eng. Math. Sci. Jpn. Soc.
No.1: 85, 76, 77, 92, 79
No.2: 78, 73, 87, 66, 80
No.3: 89, 71, 68, 70, 75
あなたの回答
tips
プレビュー