Home C Language Basic C Programs Multiplication Table in C

Multiplication Table in C

Write a C Program to print nth multiplication table.

#include<stdio.h>

int main()

{

   int n,i;

   printf(“Enter a number: “);

   scanf(“%d”,&n);

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

      printf(“%d x %d = %d\n”,n,i,n*i);

   return 0;

}

Output:

Enter a number: 147
147 x 1 = 147
147 x 2 = 294
147 x 3 = 441
147 x 4 = 588
147 x 5 = 735
147 x 6 = 882
147 x 7 = 1029
147 x 8 = 1176
147 x 9 = 1323
147 x 10 = 1470

For improvement of your coding skills we give some tasks along this. If you solve this tasks and send to our email (onlineexamshubteam@gmail.com) with your details. We will display your details(like Name, City, college, photo) in our site.

Task: Write a C program to generate multiplication tables from ‘m’ to ‘n’ natural numbers. For example user entered 42 & 45 then it will print 42nd, 43rd, 44th, 45th multiplication tables.