Sunday, 1 February 2015

print 1 to 100 without Loop

Structure of the Problem Requirements 

This Program will print 1 to 100 counting without loop in C++ . For this program we used recursive function. A recursive function is that which call itself again and again. The function calling is in the body of the function and when we want to terminate the function we apply some condition to it which called base case.

Source Code

using namespace std;
int counting (int start);
int main ()
cout<<"\t \t \t LEP Tutorials \n \n ";
int start = 1;
int counting (int start)
if (start<=100)
cout<<start<<" ";

Output of the Program

print 1 to 100 without Loop

Share it Please

About Author!

Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.


Post a Comment