Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 5 Q.7 Drawing a tree Description Lab 5-7. Drawing a tree It is very upsetting to see so many trees being destroyed in the

Lab 5 Q.7 Drawing a tree

Description

Lab 5-7. Drawing a tree

It is very upsetting to see so many trees being destroyed in the typhoon. You will now prepare this program to draw a virtual tree.

Just ask the user the height of the tree, and the program shall draw accordingly. You are not required to verify the input range, but you can assume the height will be at least 2 and at most 20.

Deadline: 13 Mar, 2023 (Mon)

Input

An integer stating the height of the tree

Output

Drawing the whole tree based on the input height

Sample Input 1

10

Sample Output 1

 oo oooo oooooo oooooooo oooooooooo oooooooooooo oooooooooooooo oooooooooooooooo oooooooooooooooooo oooooooooooooooooooo ||

Sample Input 2

4

Sample Output 2

 oo oooo oooooo oooooooo ||

Sample Input 3

2

Sample Output 3

 oo oooo ||

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_2

Step: 3

blur-text-image_3

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

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago