Question
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
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
Get Instant Access to Expert-Tailored Solutions
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