//TO PRINT THE NOS. BETWEEN 1 TO 100 & 100 TO 1 ...WITHOUT USING LOOP...
//TO PRINT LIKE THIS...I MAY USE RECURSION OF FUNCTION ...MEANS IN THE DEFINATION OF FUNCTION AGAIN CALL THAT FUNCTION & PERFORM SOME TASK AGAIN & AGAIN..//
//U MAY USE goto STATEMENT ...BUT goto STATEMENT CHANGES NORMAL EXECUTION OF PROGRAM & BCZ VALUE OF PROGRAM COUNTER CHANGES SUDDENLY..,.,WHICH MAKES IT DIFFICULT TO UNDERSTAND PROGRAM..//
#include<stdio.h>
void get_no1(int);
void get_no2(int);
int main()
{
int i=100;
get_no1(i);
printf("\n");
printf("\n");
get_no2(i);
return 0;
}
void get_no1(int i)
{
if(i > 0)//print the value of i untill i>0...less than this value of i ...//
{
printf("%d\t",i);//print i
--i;//decrement i everytime ..//
get_no1(i);//call the same function again...//
}
}
void get_no2(int num)t
{
static int i=0;
if(i<num)//in same way ...print i<num ..print value of i untill i becomes equal to number//