Write your question here.
Okay, so I am trying to figure out how to create a program that will draw a triangle using *'s with a base the has a user-inputted number of *'s like so:

*
***
*****
It needs to take a user inputted number and draw a pyramid like the above pyramid with the number of *'s in the base matching the user inputted number (i.e., user enters 10, so the triangle has 10 *'s in the base). I figured it would be best to first create a loop to draw out the correct number of *'s before trying to create another loop to draw out the correct number of spaces, to properly align the *'s into a triangle shape. Any pointers, or help, or explanation would be so helpful. Thanks.

int width = 0;
int height = 0;
int i = 0;
int leafWidth = 0;
int i2 = 1;
int i3 = 1;
int i4 = 1;

cout << "Enter trunk height: " << endl;
cin >> height;
cout << "Enter trunk width: " << endl;
cin >> width;
cout << "Enter leaves width: " << endl;
cin >> leafWidth;
cout << endl;
i2=1;
i3=1;
i4=1;
while (i2<=leafWidth){
while (i3 <=i4){
cout << "*";
i3=i3+1;
i4=i4+2;
}
cout << endl;

i2 = i2+2;
}