Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming C++ Below is the question. Below is the starter code. Below is the grading rubric for what is needed to receive full points. I

Programming C++
Below is the question.
image text in transcribed
image text in transcribed
Below is the starter code.
image text in transcribed
Below is the grading rubric for what is needed to receive full points.
image text in transcribed
I do not want another answer posted on this that was used for a previous question. Will give thumbs up for correct answer.
Loops Drawing a tree In this programming assignment, you'll draw a tree based on user specifications. The starter program draws a tree, using a triangle with three levels as the leaves and a rectangle with four levels as the trunk. 1. Modify the above program to ask the user to specify a number of tree trunk levels (Enter trunk height: "), then use a loop to draw that many levels. Testing suggestion: If the user specifies 4 tree trunk levels, than the original tree should be drawn. 2. Modify the program again to ask the user to specify a number of tree trunk "s per level ('Enter trunk width: "), then use a loop to draw that many "s per level. You'll need to use a nested loop in which the inner loop draws the "s, and the outer loop iterates a number of times equal to the number of tree trunk levels. 3. Modify the program to ask the user to specify a number of tree leaves levels (Enter leaves width: "), then use a nested loop to draw that many levels. You'll need two inner loops for drawing the leaves: one for outputting spaces and one for outputting .'s. The outer loop iterates a number of times equal to the number of tree leaves levels. Note: Your program only needs to support odd-numbered widths,like the below examples. Here is an example program execution (user input is highlighted here for clarity): Enter trunk height: 7 Enter trunk width: 3 Enter leaves width: 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

What magazine and ads did you choose to examine?

Answered: 1 week ago