Depression1 15 Newbie Poster

Hi, I've been having issues with my program where I make the rocket do what its supposed to do when it comes to outputting a filled and hollow rocket body depending on either a odd or even value. The only problem I am currently having is duplicating the body length also known as adding stages of how long I want the boyd to be.

Here's my code:

[code]
//Draw a Rocket with a filled or hollow body with stages
#include <iostream>
using namespace std;

void drawOddBox(/* in*/ int, /* in */ int); //Function prototype with two value parameters
void getDimensions(/* out */ int&, /* out */ int&); //Function prototype with two reference parameters
void drawEvenBox(/* in*/ int, /* in */ int); //Function prototype with two value parameters
void drawHorizontalLine(int);   //Function Prototype with one value parameter
void drawCone();    //Function prototype

int main()
{
    int width = 5, numRows = 10, stages = 0;

    //cout << width << " " << numRows << endl;
    getDimensions(width, numRows);  //A function call with two arguments
    //cout << width << " " << numRows << endl;

    if(numRows % 2 == 0)
    {
        drawCone(); //A function call to generate a cone
        drawHorizontalLine(width);  //A function call to generate a horizontal line
        drawEvenBox(width, numRows); //Function call to generate a hollow box
        drawHorizontalLine(width);  //A function call to generate a horizontal line
        drawCone(); //A function call to generate a cone
    }

    else
    {
        drawCone(); //A function call to generate a cone
        drawHorizontalLine(width);  //A function call to generate a horizontal line
        drawOddBox(width, …
rproffitt commented: Maybe a typo there. Try BODY instead of boyd. +15