7.3.08

print 1 to 100 without using loop

Printing from 0 to 100 without using
any loop.

we can do this using recursion.

Code:
void print()
{

static int x;
if (100 == x )
return; /* or use exit call*/

printf("%d", x++);
print(x);

}