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

Popular posts from this blog

8086 STRING MANIPULATION –FIND AND REPLACE A WORD

Animated Circles In C++

C program to find out the sum of series 1 + 2 + …. + n.