Saturday, 28 April 2012

To Print n Numbers without using For loop in C

#include<stdio.h>
#include<conio.h>

int main()
{
    int i=1;
    get(i);
    getch();
    return 0;
}
int get(i)
{
    if(i<=50)
    {
  printf("%d ",i);
  get(i+1);
    }
    return 0;
}

No comments:

Post a Comment