Here this problem is solved by a recursive function. Firstly, initialized some value into display(value) function and this function will call again and again until the given condition is not false.

I suggest you if you are not familiar with recursive function then first go study about recursive function.

How To print numbers from 1 to 10 without using loop program.

 #include<stdio.h>
 void display(int n)
 { if(n &gt; 0) { display(n-1);
 printf("%d ", n); } return;
 } int main() { display(100);
 return 0; }

Output:-1 2 3 4 5 6 7 8 9 10

Explanation of Program :

In this program, we call display() function and this will call again by again until the condition is not false. You can deeply understand by given descriptions.
display(10)
void display(int n)
Now here,
If ( n > 0 ) then
display(n-1)
It will continuously play until the condition false.
Value will print 1 2 3 4 5 6 7 8 9 10

This article is written by our awesome writer
Comments to: C program to Print Numbers from 1 to 10 without using Loop

Your email address will not be published. Required fields are marked *

Attach images - Only PNG, JPG, JPEG and GIF are supported.

New Dark Mode Is Here

Sign In to access the new Dark Mode reading option.

Join our Newsletter

Get our monthly recap with the latest news, articles and resources.

By subscribing you agree to our Privacy Policy.

Latest Articles

Explore Tutorials By Categories

About

Codeverb is simply an all in one interactive learning portal, we regularly add new topics and keep improving the existing ones, if you have any suggestions, questions, bugs issue or any other queries you can simply reach us via the contact page

Login

Welcome to Codeverb

Ready to learn something new?
Join Codeverb!

Read Smart, Save Time
  •  
    Strength indicator
  •  
  •  
    Log In | Lost Password