Question: C programming Task is to print a box of two triangles using nested loops. Sample printout below: ....# ...## ..### .#### ##### 1. Implement the
C programming
Task is to print a box of two triangles using nested loops. Sample printout below:
....# ...## ..### .#### #####
1. Implement the function void draw_triangle(unsigned int size) which draws a square box with a triangle inside it. and another triangle consisting of twigs #. The function prints the output of the example when it is called in the form draw_triangle(5); . 2.The square box should have size characters wide and size characters high. 3.The box should be divided diagonally with # in the lower right corner and . In the upper left corner. 4. The first row should have one twig fence in the upper right corner and the last row should be filled with twig fences. 5. (optional) For example, to test a function, you should implement a main function that asks the user for an input of an unsigned int number and calls the input given using the draw_triangle function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
