Print isosceles triangles. For each triangle, allow the user to input two values: a character to be

Question:

Print isosceles triangles. For each triangle, allow the user to input two values: a character to be used for printing the triangle and the size of the peak for the triangle. Test the input for valid characters. The size of the triangle should not be larger than 10.

If an invalid non-numeric character is entered for size or if the value entered for size is larger than 10, use 3 as the default value. If an invalid entry is entered for the character, use an asterisk ( * ) as the default character. Allow multiple triangles to be printed. For example, if the user inputs # for the character and 6 for the peak, you should produce the following display:

#

# #

# # #

# # # #

# # # # #

# # # # # #

# # # # #

# # # #

# # #

# #

#

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: