编辑代码

#include <stdio.h>

int main(void)
{
    int a[4][3] = {0};
    int b[3][4] = {0};
    int i, j;
    int k = 1, m = 12;

    
    printf("开始输入a[4][3]与b[3][4]的值:\n");
    for(i = 0; i < 4; i++ )
    {
        for(j = 0; j < 3; j++)
        {
            a[i][j] = k;
            k++;
        }
    }
    for(i = 0; i < 3; i++ )
    {
        for(j = 0; j < 4; j++)
        {
            b[i][j] = m;
            m--;
        }
    }
    

    
    printf("输入完毕:\n");
    for(i = 0; i < 3; i++ )
    {
        for(j = 0; j < 3; j++)
        {
            printf("a[%d][%d] = %d", i, j, a[i][j] );
            printf("   *   ");
            printf("b[%d][%d] = %3d", i, j, b[i][j]);
            printf("%6d\n", a[i][j] * b[i][j]);
        }
    }


   
    



    return 0;
}