Question: in C Write a program to display 2 right triangles - one with the base on the bottom and the hypotenuse on the right, and
in C Write a program to display right triangles one with the base on the bottom and the hypotenuse on the right, and one with the base at the top and the hypotenuse on the left.
Ask the user for a number between and for the size of the base of the triangles. pt
Enter the size of the base for the triangles :
Validate that the number entered is between and inclusive, and if not inform the user and reask for the number until a number in the correct range is entered. pts
Create constants for the minimum and the maximum numbers, and use the constants in the prompts, the validation condition, and the validation error message.
Enter the size of the base for the triangles : The base of the triangles must be between and Please reenter. Enter the size of the base for the triangles :
Display a right triangle with the base on the bottom and the hypotenuse on the right, using the character X pts
Enter the size of the base for the triangles : Base at bottom Hypotenuse on right X XX XXX XXXX
Display a second right triangle with the base on the top and the hypotenuse on the left, using the character X and spaces. pts
Enter the size of the base for the triangles : Base at bottom Hypotenuse on right X XX XXX XXXX Base at top Hypotenuse on left XXXX XXX XX X
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
