Program to print the first 50 natural numbers using recursion in C++. Solution : #include <iostream> using namespace std; void natural(int n) { if(n<=50) { cout<<n<<“\t”; natural(n+1); //function call itself…
© Study Trigger. All Rights Reserved
Program to print the first 50 natural numbers using recursion in C++. Solution : #include <iostream> using namespace std; void natural(int n) { if(n<=50) { cout<<n<<“\t”; natural(n+1); //function call itself…