C Program to Generate Multiplication Table of a Given Number

Program


#include<stdio.h>
#include<conio.h>

int main()
{
	 int number, i, product;
	 clrscr();
	 printf("Enter Number: ");
	 scanf("%d", &number);
	
	 /* Generating Multiplication Table */
	 for(i=1;i<=10;i++)
	 {
		  product = number * i;
		  printf("%d x %d = %d\n", number, i, product);
	 }
 getch();
 return(0);
}

Output of the above program :

Enter number: 9 ↲
9 x 1 = 9
9 x 2 = 18
9 x 3 = 27
9 x 4 = 36
9 x 5 = 45
9 x 6 = 54
9 x 7 = 63
9 x 8 = 72
9 x 9 = 81
9 x 10 = 90

Note: ↲ indicates ENTER is pressed.