Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c program code whole code thanks not phython is c programming Lab 5 Q.7 Drawing a tree Description Lab 5-7. Drawing a tree It is

c program code
whole code thanks not phython is c programming
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

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

Students also viewed these Databases questions

Question

At what level(s) was this OD intervention scoped?

Answered: 1 week ago