Thursday, 2 August 2012

Write a program to print numbers from 1 to 100 without using loops!!!

void printNumbers(int startNumber, int endNumber) 

if (startNumber > endNumber) 
return; 

printf("%d\n", startNumber++); 
printNumbers(startNumber, endNumber); 
}

No comments:

Post a Comment