c program to print the multiplication table from 1 to 10

Description


This program prints the multiplication table of numbers from 1 to 10.  The program uses two for loops. The first for loop increments numbers from 1 to 10, at each increment, the second for loop prints the multiplication table of the corresponding number.

Program


#include<stdio.h>

#include<conio.h>

void main()

{

int k;

for(int i=1;i<=10;i++)

{

for(int j=1;j<=10;j++)

{

k=i*j;

printf("%d*%d=%d\t",i,j,k);

}

printf("\n");

}

getch();

}

No comments: