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

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:

#

##

###

####

#####

######

#####

####

###

##

#

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Systems Analysis Design Questions!