I need to output picture of a rocket using * the program works. The top of the rocket doesn't line up with the body of the rocket. Can someone point me in the write direction on how to start it. the function i am using is called drawCone.
#include <iostream>
#include <iomanip>
using namespace std;
void drawCone()
{
cout << " * " << endl;
cout << " * * " << endl;
cout << "* *" << endl;
}
void drawBox(int height, int width)
{
int i, j;
int number_of_stages ;
cout << " How many stages do you want in your rocket:";
cin >> number_of_stages;
drawCone();
for(j = 0; j < number_of_stages; j++)
{
for(i=0; i<width; i++)
{
cout <<"*";
}
cout <<endl;
for(i = 0; i < height; i++)
{
cout << "*";
cout.width(width-1);
cout << "*" << endl;
}
for(i=0; i<width; i++)
{
cout<<"*";
}
cout <<endl;
}
drawCone();
}
int main()
{
cout << "Today we will output a picture of a rocket using the symbol of an astrick." << endl;
int height, width;
cout << "Enter the width of what your rocket should be " << endl;
cin >> width;
cout << "Enter the height of what your rocket should be MM " << endl;
cin >> height;
drawBox(height, width);
return 0;
}