Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help programing these four parts in C. The last picture is what my professor gave me to start with. Thanks for the help.

I need help programing these four parts in C. The last picture is what my professor gave me to start with. Thanks for the help.image text in transcribedimage text in transcribedimage text in transcribed

Show transcribed image text

Part 1 Write a program that prompts a user to input the height of a right triangle and then draws the triangle in the terminal window. Inside the main function, write the code necessary to draw the right triangle like the one shown in the example below. You MUST call the print spaces and print lines functions from the main function to print the space and asterisk characters to the terminal window. In part 1, DO NOT modify the print spaces or print lines function. Example run (user input in bold) Enter the height for your triangle: 6 When you are ready to compile the program, in the Cygwin window type the command make To run the program, in the Cygwin window type the command ./RightTriangle.exe Part 2 In Part 2, you must modify the print_line function to alter the look of the triangle. Rather than drawing a solid triangle, as in Part , you should now draw only the left and right sides of the triangle with an empty center. An example of this triangle can be seen below. You should NOT need to modify the code that you wrote for Part 1. That is, do not modify any of the code in your main function. Example run (user input in bold) Enter the height for your triangle: 6

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

Recommended Textbook for

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions