C program to print 1 to 100 numbers without any loop or recursion - My CS Tutorial - My CS Tutorial

Breaking

Programming languages full tutorial and programs, exam papers, visual basic( Vb.net ), information of new technologies and more....

Tuesday, December 10, 2019

C program to print 1 to 100 numbers without any loop or recursion - My CS Tutorial

In this tutorial we will learn how to write a C program that print 1 to 100 numbers without any loop or recursion.


C Program Code


#include<stdio.h>
#include<conio.h>
int main()
{
int num = 1;
print(num);
return 0;
}
int print(num)
{
if(num<=100)
{
printf("\t %d ",num);
print(num+1);
}
}


OUTPUT:




In the output we can see the numbers from 1 to 100 without any loop or recursion.




Please share this post and blog link with your friends.For more programs use this blog.
If you have any problem, please comment in comment box, subscribe this blog for notifications of new post on your email and follow this blog.

Created by-- HARSH CHAUHAN

No comments:

Post a Comment