Allow the user to input two values: a character to be used for printing an isosceles triangle

Question:

Allow the user to input two values: a character to be used for printing an isosceles 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 entry 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. 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: