subject

Write a program that asks the user to enter the size of a triangle (an integer from 1 to 50). Display the triangle by writing lines of asterisks. The first line will have one asterisk, the next two, and so on, with each line having one more asterisk than the previous line, up to the number entered by the user. On the next line write one fewer asterisk and continue by decreasing the number of asterisks by 1 for each successive line until only one asterisk in displayed. (Hint: Use nested loops; the outside loop controls the number of lines to write, and the inside loop controls the number of asterisks to display on a line. Complete the program by solving the upper triangle followed by the lower triangle.)

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:30, ghopk5929
In the film "epic 2015," epic is the name for:
Answers: 3
image
Computers and Technology, 22.06.2019 13:00, mariahrpoulin9630
Which part of the cpu accepts data?
Answers: 1
image
Computers and Technology, 22.06.2019 21:10, itsmichaelhere1
Dameas communication challenge is due to which factor
Answers: 2
image
Computers and Technology, 23.06.2019 06:00, jack487
How can a user delete a drawing object
Answers: 1
You know the right answer?
Write a program that asks the user to enter the size of a triangle (an integer from 1 to 50). Displa...

Questions in other subjects:

Konu
English, 13.10.2020 14:01
Konu
Spanish, 13.10.2020 14:01
Konu
Mathematics, 13.10.2020 14:01