Hey guys, Im new to C++ and have a problem for class we are supposed to try. I need to have a triangle formed of characters that varies based on what the user enters as the height. Its supposed to look like this:
*
**
***
****
***
**
*
...with varying height as an input.
I was able to get a right triangle for the way up...
i.e.
5
*
**
***
****
*****
but I am not sure how to go about for the other half of the triangle. My professor wants us to use a second for loop but I dont really know what to use for variables and such. Heres what I have so far...
#include <iostream>
#include <string>
#include <math.h>
using namespace std;