English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1 answers

This example illustrates recursive calls:

int factorial( int num ); /* Function prototype */

int main()
{
int result, number;
.
.
.
result = factorial( number );
}

int factorial( int num ) /* Function definition */
{
.
.
.
if ( ( num > 0 ) || ( num <= 10 ) )
return( num * factorial( num - 1 ) );
}



sorry cant find any program of that sort , and to write one i may well take more than one hour.

good luck :)

2006-11-13 01:23:07 · answer #1 · answered by Aqua 4 · 0 0

fedest.com, questions and answers