Exemplo n.º 1
0
void count_to_ten(int count)
{
    if (count < 10)
    { 
        printf("Count: %d\n", count);
        count_to_ten(count + 1);
    }
}
Exemplo n.º 2
0
void count_to_ten ( int count )
{
    // we only keep counting if we have a value less than ten
       if ( count < 10 )
       {
           count_to_ten( count + 1 );
       }
}
Exemplo n.º 3
0
void count_to_ten ( int count )
{
    /* we only keep counting if we have a value less than ten */
       if ( count < 10 )   
       {
	printf("\nbefore call %d",count);
           count_to_ten( count + 1 );
	printf("\n:after call %d",count);
       }
}
Exemplo n.º 4
0
int main()
{
    //recurse(1); /* First function call so it starts at 1 */ 
    count_to_ten(0);
    return 0;
}
Exemplo n.º 5
0
int main () {
    count_to_ten (0);
}