Print one to hundred without using loop
source code:
#include<stdio.h>
int main()
{
int num = 1;
print(num);
getch();
return 0;
}
int print(num)
{
if(num<=100){
printf("%d ",num);
print(num+1);
}
}
Comments
Post a Comment