C++ problem, can anyone help me with this? You are to write a program that display a rocket ship on the screen, like this one:
C++ problem, can anyone help me with this? You are to write a program that display a rocket ship on the screen, like this one:
/**\
//**\\
///**\\\
////**\\\\
/////**\\\\\
+=*=*=*=*=*=*+
|../\..../\..|
|./\/\../\/\.|
|/\/\/\/\/\/\|
|\/\/\/\/\/\/|
|.\/\/..\/\/.|
|..\/....\/..|
+=*=*=*=*=*=*+
|\/\/\/\/\/\/|
|.\/\/..\/\/.|
|..\/....\/..|
|../\..../\..|
|./\/\../\/\.|
|/\/\/\/\/\/\|
+=*=*=*=*=*=*+
/**\
//**\\
///**\\\
////**\\\\
/////**\\\\\
You are to exactly reproduce this output. The various sub-figures in this output have a size of 3. These sub-figures have the property that their size determines a parameter we call the size of the rocket, so there is one size variable. All the function you write must have that size as parameter. The previous figure is a rocket of size 3 and can be obtained by providing the value 3 as the size requested by the program:
Welcome to the Rocket Ship Program
Enter the size of the rocket: 3
/**\
//**\\
///**\\\
////**\\\\
/////**\\\\\
+=*=*=*=*=*=*+
|../\..../\..|
|./\/\../\/\.|
|/\/\/\/\/\/\|
|\/\/\/\/\/\/|
|.\/\/..\/\/.|
|..\/....\/..|
+=*=*=*=*=*=*+
|\/\/\/\/\/\/|
|.\/\/..\/\/.|
|..\/....\/..|
|../\..../\..|
|./\/\../\/\.|
|/\/\/\/\/\/\|
+=*=*=*=*=*=*+
/**\
//**\\
///**\\\
////**\\\\
/////**\\\\\
On any given execution your program will produce just one version of this figure, but it is possible to change the size of the rocket to have your program produce a figure of a different size. For example, with size equal to 5 the output should look like this:
Welcome to the Rocket Ship Program
Enter the size of the rocket: 5
/**\
//**\\
///**\\\
////**\\\\
/////**\\\\\
//////**\\\\\\
///////**\\\\\\\
////////**\\\\\\\\
/////////**\\\\\\\\\
+=*=*=*=*=*=*=*=*=*=*+
|..../\......../\....|
|.../\/\....../\/\...|
|../\/\/\..../\/\/\..|
|./\/\/\/\../\/\/\/\.|
|/\/\/\/\/\/\/\/\/\/\|
|\/\/\/\/\/\/\/\/\/\/|
|.\/\/\/\/..\/\/\/\/.|
|..\/\/\/....\/\/\/..|
|...\/\/......\/\/...|
|....\/........\/....|
+=*=*=*=*=*=*=*=*=*=*+
|\/\/\/\/\/\/\/\/\/\/|
|.\/\/\/\/..\/\/\/\/.|
|..\/\/\/....\/\/\/..|
|...\/\/......\/\/...|
|....\/........\/....|
|..../\......../\....|
|.../\/\....../\/\...|
|../\/\/\..../\/\/\..|
|./\/\/\/\../\/\/\/\.|
|/\/\/\/\/\/\/\/\/\/\|
+=*=*=*=*=*=*=*=*=*=*+
/**\
//**\\
///**\\\
////**\\\\
/////**\\\\\
//////**\\\\\\
///////**\\\\\\\
////////**\\\\\\\\
/////////**\\\\\\\\\
Your program should have many functions apart from the main function, and the top function to draw the rocket should have the following profile:
void draw_rocket(int size);
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started