subject

Write a program that, prints a ‘pine tree’ consisting of triangles of increasing sizes, filled with a character (‘*’ or ’+’ or ‘$’ etc). your program should consist of three functions: 1. a function print_shifted_triangle(n, m, symbol). it prints an n-line triangle, filled with symbol characters, shifted m spaces from the left margin. for example, if we call print_shifted_triangle(3, 4, `+`), the expected output is: + +++ 2. a function print_pine_tree(n, symbol). it prints a sequence of n triangles of increasing sizes (the smallest triangle is a 2-line triangle), which form the shape of a pine tree. the triangles are filled with the symbol character. for example, if we call print_pine_tree(3, `#`), the expected output is: # ### # ### # ### 3. a main() function that interacts with the user to read the number of triangles in the tree and the character filling the tree.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 25.06.2019 01:30
The physical parts or components of a computer system is called .
Answers: 1
question
Computers and Technology, 25.06.2019 08:20
In the context of computer operations division is a(n)
Answers: 2
question
Computers and Technology, 25.06.2019 22:00
Game design 40 points. . if you then you are godly.
Answers: 1
question
Computers and Technology, 25.06.2019 23:30
Adam has to write a paper where the margins need to be set to these measurements: left: 1.5" right: 4" bottom: 1" top: 1"
Answers: 1
You know the right answer?
Write a program that, prints a ‘pine tree’ consisting of triangles of increasing sizes, filled with...
Questions
Questions on the website: 13722361