So Im Having Problems Making My Recursion Program to work. This Is My Code...
#include<iostream>
#include<fstream>
#include<string>
#include<windows.h>
#include<ctime>
using namespace std;
int i;
bool end = false;
int changer = -1;
int recursion(int num1)
{
if(num1 = 0)
{
return 0;
}
for(i = 1; i <= num1; i++)
{
cout << "*";
}
cout << endl;
recursion(num1 - 1);
}
int main()
{
int number;
cout << "Input Star Number...\n";
cout << "\t Input: ";
cin >> number;
recursion(number);
return 0;
}
The Output I Want. If I Input 4...
4 3 2 1
3 2 1
2 1
1
The OutPut I get
If I Input 4
Press Any Key.
I Got Nothing To Output. Please Help. Thank You.
(Sorry For Bad Grammer)
Note: Pretend There Is not A Space In Between The Numbers... Stock Over Flow Just Wont Line Line It Up The Way I Want.