//print a multiplication table of any integer taking from user
#include "stdio.h"
int main ()
{
int n,mul,i;
printf ("Enter any number :\n");
scanf ("%d",&n);
printf ("the multiplication table of %d is:\n ",n);
for(i=1;i<=10;i++){
mul=n*i;
printf ("%d*%d=%d\n",n,i,mul);
}
return 0;
}
output output output output
Enter any number :
9
the multiplication table of 9 is:
9*1=9
9*2=18
9*3=27
9*4=36
9*5=45
9*6=54
9*7=63
9*8=72
9*9=81
9*10=90
No comments:
Post a Comment