menu
Qammunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
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: * * * *
asked
Sep 20, 2022
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:
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *
Health
college
Halfflat
asked
by
Halfflat
7.9k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
7
votes
Answer:
2(5)-1=9
Step-by-step explanation:
Dnaranjo
answered
Sep 27, 2022
by
Dnaranjo
8.9k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Sep 9, 2024
19.4k
views
Draw a fancy pattern Write a program called xtreme.c that reads an (odd) integer n from standard input, and prints an nxn a square of asterisks and dashes in the following pattern: n: 9 *---*---* -*-----*-
Otwtm
asked
Sep 9, 2024
by
Otwtm
8.0k
points
Engineering
high-school
1
answer
1
vote
19.4k
views
asked
Feb 8, 2024
875
views
What does the following code print? for (int i = 1; i < 6; i++) { for (int y = 1; y <= 4; y++) { System.out.print("*"); } System.out.println(); } a) It prints a single line of 20 asterisks. b) It prints five lines, each containing four asterisks. c) It prints five lines, each containing five asterisks. d) It results in a compilation error.
Venzen
asked
Feb 8, 2024
by
Venzen
8.8k
points
Computers and Technology
high-school
1
answer
4
votes
875
views
asked
Mar 22, 2018
95.8k
views
Write the definition of a function named printpoweroftwostars that receives a non-negative integer n and prints a line consisting of "2 to the n" asterisks. so, if the function received 4 it would print
Kainax
asked
Mar 22, 2018
by
Kainax
8.4k
points
Computers and Technology
high-school
1
answer
4
votes
95.8k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Other Questions
This gas makes up close to one fourth of the air surrounding earth
Is the plurea one of the membranes beside the lungs?
To develop good eye habits, you should ___________.
How do heart and lungs work together?
Why does your eyes burn
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qammunity.org