Q:

C Program to print number from 1 to 100 without using any loop conditions. So, print numbers using recursive functions

0

C Program to print number from 1 to 100 without using any loop conditions. So, print numbers using recursive functions

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include<stdio.h>

int recursive(int value)

{

      int i;

      printf("%d\n", value);

      i = value + 1;

      if (i > 100)

          return 0;

      recursive(i);

}

 

int main() 

{

      recursive(1);

      return 0;

}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now