#include<stdio.h>
int mul(int n,int i);
void main()
{
int n,i=1;
printf("enter a number\n");
scanf("%d",&n);
mul(n,i);
}
int mul(int n,int i)
{
if(i>10)
{
return 0;
}
else
{
printf("%d*%d=%d\n",n,i,n*i);
return mul(n,i+1);
}
}
output:
Enter a number 10
10*1 = 10
10*2 = 20
10*3 = 30
10*4 = 40
10*5 = 50
10*6 = 60
10*7 = 70
10*8 = 80
10*9 = 90
10*10 = 100