-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction.c
More file actions
30 lines (28 loc) · 705 Bytes
/
function.c
File metadata and controls
30 lines (28 loc) · 705 Bytes
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
void scan(int a, int b, int p[][100]) {
printf("Enter elements in matrix: \n");
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
scanf("%d", &p[i][j]);
}
}
}
void print(int a, int b, int p[][100]) {
printf("The matrix is: \n");
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
printf("%d ", p[i][j]);
}
printf("\n");
}
}
void scan1() {
int a,b,p[100][100];
printf("Enter row and column : ");
scanf("%d%d",&a,&b);
printf("Enter elements in matrix: \n");
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
scanf("%d", &p[i][j]);
}
}
}