Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You want to create a program to display 4 different size of triangle. The program should: i. Ask student to enter the size of first
You want to create a program to display 4 different size of triangle. The program should: i. Ask student to enter the size of first triangle, ii. The subsequence triangle should be 1/2, 1/3 and 1/4 of the size of first triangle in. Write the program with shortest code possible. The expected output of the program should be as shown in Figure 04. Enter the size of first triangle: 12 1 111 11111 1111111 111111111 11111111111 1111111111111 111111111 11111111 11 11111 1111111 111 1111 11111 2 222 22222 2222222 222222222 22222222222 3 333 33333 3333333 4 444 44444 Program finished with exit code 0 Figure 04 (BEEC 313) Based on the following requirement, you have to: (a Identify the required programming technique and method to achieve shortest program code. [2 marks] (b) Draw the flowchart for the program. [9 marks] (c) Write the complete program. [14 marks]
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