I think I have the basic idea of how to do it: Output a line of the row, subtract 1 from the integer,, output the like again, and repeat until the integer is = 0.
My problem right now is that I have no idea on how to transform the integer, for example 7, to "******?"
#include <iostream>
usingnamespace std;
int main()
{
int rows;
cout << "Please enter a number of rows to display: ";
cin >> rows;
cout << "\n";
while (rows > 0)
{
for (i = 1; <= row )
}
return 0;
}
The first (encompssing loop): i = 0 -> rows
The second (first inner loop loop): j = 0 -> rows - i - 1 -> cout '*'
The third (second inner loop loop): j = 0 -> i + 1 -> cout '?'