Saturday, September 20, 2014

Program to print counting 10 to 1 using recursion

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

Share this

0 Comment to "Program to print counting 10 to 1 using recursion "