18.5k views
5 votes
Write a complete program that inputs a positive integer n and then prints a

triangle of asterisks n lines high and 2n - 1 columns wide. For example, if the

input is 5 then the output should be:

*

* * *

* * * * *

* * * * * * *

* * * * * * * * *​

User Halfflat
by
3.8k points

1 Answer

7 votes

Answer:

2(5)-1=9

Step-by-step explanation:

User Dnaranjo
by
4.6k points