-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDiziler-10.c
51 lines (47 loc) · 1.13 KB
/
Diziler-10.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
// İki matrisin çarpımı ( Yarım kaldı)
int main(int argc, char *argv[])
{
int x[50][50], y[50][50], result[50][50];
int i, j, k, sum = 0;
int xrows, xcolumns, yrows, ycolumns;
printf("x matrisinin satir ve sutununu gir: ");
scanf("%d%d", &xrows, &xcolumns);
printf("x matrisinin degerlerini girin:\n");
for (i = 0; i < xrows; i++)
{
for (j = 0; j < xcolumns; j++)
{
printf("x[%d][%d]:", i, j);
scanf("%d", &x[i][j]);
}
}
printf("y matrisinin satir ve sutununu gir: ");
scanf("%d%d", &yrows, &ycolumns);
printf("y matrisinin degerlerini girin:\n");
if (yrows != xcolumns)
{
printf("Hata");
}
else
{
for (i = 0; i < yrows; i++)
{
for (j = 0; j < ycolumns; j++)
{
printf("y[%d][%d]:", i, j);
scanf("%d", &y[i][j]);
}
}
}
for ( i = 0; i < xrows; i++)
{
for (j = 0; j < ycolumns; j++)
{
/* code */
}
}
return 0;
}