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 %26gt; 0 ) || ( num %26lt;= 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 :)
pokemon cards
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment