-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathex9.c
37 lines (29 loc) · 849 Bytes
/
ex9.c
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
33
34
35
36
37
#include<stdio.h>
int main(){
int n_students = 3;
int n_subjects = 5;
int school = 2;
int marks[3][5][2];
for (int i = 0; i <n_students; i++)
{
for (int j = 0; j <n_subjects; j++)
{
for (int k = 0; k <school; k++)
{
printf("Enter the marks of student %d in subject %d from school %d\n",i+1,j+1,k+1);
scanf("%d",&marks[i][j][k]);
}
}
}
for (int i = 0; i <n_students; i++)
{
for (int j = 0; j <n_subjects; j++)
{
for (int k = 0; k < school; k++)
{
printf("marks of student %d in subject %d from school %d is: %d\n\n",i+1,j+1,k+1,marks[i][j][k]);
}
}
}
return 0;
}