📜  c语言中使用数组的乘法表-C编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:36.445000             🧑  作者: Mango

代码示例3
#include 

int main()
{
    int namta[11][10]; //programme will run upto 11 multiplication tables, each table has 10 columns
    int i,j;
    for(i = 1; i <= 11; i++)
    {
        for(j = 1; j <= 10; j++)
        {
            namta[i][j] = i * j;  //getting the multiplating value into the array
        }
    }

    for(i = 1; i <= 10; i++){
        for(j = 1; j <= 10; j++){
            printf("%d x %d = %d\n",i,j,namta[i][j]);  //printing the array of results calculated in the previous loops
        }
        printf("\n");
    }


    return 0;
}