Pages

Print Counting From 1 to 100 without Loop

Friday, 19 April 2013

#include <stdio.h>

#include <conio.h>
int counting(int num);
int main()
{
    int num = 1;

    counting(num);
       getch();
}
int counting(int num){
    if(num<=100){
         printf("%d ",num);
         counting(num+1); // this is main thing which execute loop again and again while num is less than 100.
    }
}

 

Search Box

Most Reading

Contact Form

Name

Email *

Message *