Answers for "multiplication table program in c using two dimensional array"

C
0

multiplication table in c using array

#include <stdio.h>

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 = %dn",i,j,namta[i][j]);  //printing the array of results calculated in the previous loops
        }
        printf("n");
    }


    return 0;
}
Posted by: Guest on July-18-2021

Code answers related to "multiplication table program in c using two dimensional array"

Code answers related to "C"

Browse Popular Code Answers by Language