Saturday, September 20, 2014

Program to print counting 1 t0 10 using Recursion

#include<iostream.h>
#include<conio.h>
void myfuntion(int);
void main()
{
clrscr();
myfuntion(1);
}
void myfuntion(int counter)
{
if(counter==11)
return;
else
{
cout<<"\ncounter= "<<counter;
myfuntion(++counter);
return;
}
}

Share this

0 Comment to "Program to print counting 1 t0 10 using Recursion "