//************************************** // Name: List of Numbers Without Using a Loop in C++ // Description:A simple program that I wrote in C++ that will list down a number from one to fifty without using a looping statement in C++. The code is very short and easy to understand. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com My mobile number here in the Philippines is 09173084360. // By: Jake R. Pomperada // // // Inputs:None // // Returns:None // //Assumes:None // //Side Effects:None //************************************** #include <iostream> #include <stdlib.h> using namespace std; int print(int num){ if(num<=50){ cout << " " << num << " "; print(num+1); } } int main(){ int num = 1; cout << "\nList of Numbers Without Using a Loop in C++"; cout <<"\n\n"; print(num); cout <<"\n\n"; cout << "\nEnd of Program"; cout <<"\n\n"; system("pause"); }