Question: in C# Print isosceles triangles. For each triangle, allow the user to input two values: a character to be used for printing the triangle and
in C#
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:
#
##
###
####
#####
######
#####
####
###
##
#
Added to the specifications from the textbook, instead of allowing the user to input the character for printing, you should use your first name's initial as the character. Define this value as a constant. Addtionionally include as part of the final display a heading that includes your name along with the label "Isosceles Triangle". So, for example, my triangle would use all K's (instead of the # character) and be labeled "K's Isosceles Triangle"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
