Allow the user to input two values a character to be used


Java question:

Allow the user to input two values: a character to be used for printing a 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: (use the concept of loops)

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Allow the user to input two values a character to be used
Reference No:- TGS01733071

Now Priced at $10 (50% Discount)

Recommended (99%)

Rated (4.3/5)