Program to print multiplication table for any given number

0
73
#include<stdio.h>
#include<conio.h>
void main()
{
 int i,n;    /* i for loop counter, n for given number for which, we have print 
                   multiplication table */
 clrscr();
 printf("\n Enter n\n");
 scanf("%d",&n);
 printf("\n Multiplication table for %d is: \n", n);
   for(i=1; i<=10; i++)
      printf("%5d\n",i*n);
getch();
}
  Output:
  Enter n
  8
  Multiplication table for 8 is
  8 16 24 32 40 48 56 64 72 80

 

 

 

Program to print multiplication table for any given number Program to print multiplication table for any given number in c C Program to print multiplication table for any given number table program multiplication table program loop program for loop example

LEAVE A REPLY

Please enter your comment!
Please enter your name here