Answer:
#include <iostream>
using namespace std;
int main()
{
int rows, width, height, spaces, stars; // declare values
cout << "enter width" << endl;
cin >> width;
cout << "enter height" << endl;
cin >> height;
for (int row = 0; row < height; ++row) {
for (int col = height + row; col > 0; --col) {
if (height % 6 == 1) {
cout << "Impossible shape!" << endl;
return 0;
}
cout << " ";
}
for (int col = 0; col < (width - 2 * row); ++col) {
cout << "*";
spaces += 1;
stars -= 2;
}
cout << endl;