#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#define ROWS 2
#define COLS 3
#define ROW 3
#define COL 4
int main(void)
{
int e, f;
srand((unsigned)time(NULL));
int A[ROWS][COLS];
int a; int b;
for (a = 0; a < ROWS; ++a)
{
for (b = 0; b < COLS; ++b)
{
printf("%d ", A[a][b] = rand() % 9 + 1);
}
printf("\n");
}
printf("-------------------------\n");
int B[ROW][COL];
int c; int d;
for (c = 0; c < ROW; ++c)
{
for (d = 0; d < COL; ++d)
{
printf("%d ", B[c][d] = rand() % 9 + 1);
}
printf("\n");
}
return 0;
}
this code using rand function. make 2d array. [int A, int B]
I want multiplication using random value in 2d array.
i want to make another 2d array. and int A * int B ex) int C= int A*int B (2d array)