13 February 2010

Print 1 to N without using Looping Statement and goto in C Language royalarun.blogspot.com

Print 1 to N without using Looping and goto Statement in C Language:


void main()
{
int n;
printf("Enter the limit:");
scanf("%d",&n);
fun(n);
}
int fun(int n)
{
static int i=0;
i++;
(i<=n)?printf("\n%d",i):getch();
fun(n);
return 0;
}

1 comment:

Comments Welcome

Implementing OAuth validation in a Web API

 I mplementing OAuth validation in a Web API Implementing OAuth validation in a Web API using C# typically involves several key steps to sec...