Explicație:
#include <stdio.h>
int main()
{
int n,m,i,j;
printf("Citeste m: ");scanf("%d",&m);
printf("Citeste n: ");scanf("%d",&n);
int b[m][n];
printf("Rezultatul:\n");
for(i=1;i<=m;i++)
{
for(j=1;j<=n;j++)
{
b[i][j]=(i*j)%10;
printf("%d ",b[i][j]);
}
printf("\r\n");
}
return 0;
}