Write a program that asks the user to enter an integer from


Assignment 1

Write a program that asks the user to enter an integer from 1 to 50 (make sure to check that numbered entered is between 1 & 50). Displays an isosceles triangle by printing rows of asterisks, 1 asterisk on the first row, 2 on the second, etc., up to the number entered by the user. Then it decreases the number of asterisks by one per line back down to just one in the line printed.

Example: If user enters a 6

*
**
***
****
*****
******
*****
****
***
**
*

Use good programming techniques and prompt to run again.

 

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a program that asks the user to enter an integer from
Reference No:- TGS01142583

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)