Following is a C++ program that prints 1 to 100 without loop and without recursion.
// Note that this is not recursion
cout << N << endl;
cout << 1 << endl;
N = 100;
1 2 3 .. .. 98 99 100
Disclaimer: This does not belong to TechCodeBit, its an article taken from the below
source and credits.
source and credits: http://www.geeksforgeeks.org
We have built the accelerating growth-oriented website for budding engineers and aspiring job holders of technology companies such as Google, Facebook, and Amazon
If you would like to study our free courses you can join us at
http://www.techcodebit.com. #techcodebit #google #microsoft #facebook #interview portal #jobplacements