Answers for "c program to print multiplication table using arrays"

C
1

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 = %d\n",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
0

c program to print the multiplication table

#include <stdio.h>
int main(){
    int a, b, c, e;
    printf("Enter table format: \n");
    scanf("%d", &a);
    printf("Enter end of table: \n");
    scanf("%d", &e);
    for(b = 0; b <= e; b++){
        printf("%d * % d = %d\n", b, a, a*b);
    }
}
Posted by: Guest on April-19-2021

Code answers related to "c program to print multiplication table using arrays"

Code answers related to "C"

Browse Popular Code Answers by Language