Write a C program to display multiplication table of a given input number.

#include<stdio.h>
#include<conio.h>
int main()
{
int n,i; //n=number

   //accept number
printf("\nEnter number : ");
   scanf("%d",&n);


   //calculate and printing table
   for(i=1;i<=10;i++)
   {
      printf("%d * %d = %d\n",n,i,i*n);
   }
   getch();
   return(0);
}

0 Comments