PRINT TABLE OF A NUMBER USING RECURSION


LIST OF PROGRAMS


#include<stdio.h>
#include<conio.h>
void main()
{
void t(int n2,int i2);
int n,i=1;
clrscr();
printf("ENTER A NUMBER");
scanf("%d",&n);
printf("TABLE IS :\n");
t(n,i);
getch();
}
void  t(int n2,int i2)
{
  if(i2>10)
  {
  printf("thank you");
  }
  else
  {
printf("\t %d * %d = %d\n",n2,i2,n2*i2 );
    i2++;
    t(n2,i2);
  }
}

LIST OF PROGRAMS

Comments