1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
GenaCL600 [577]
2 years ago
8

I don't understand how to write code for this in Java using nested for loops only. The official question is: write a program tha

t produces the following hourglass figure using nested for loops?

Computers and Technology
1 answer:
Bingel [31]2 years ago
4 0

Answer:

public class Triangle

{

public static void main( String[] args )

{

show( 5 );

}

public static void show( int n )

{

int i,j,k;

for (i = 0; i < n - 1; i++ )

{

for (j = 0; j < i; j++ )

{

System.out.print( " " );

}

for (k = n - i; k > 0; k-- )

{

System.out.print( "* " );

}

System.out.println();

}

for (i = 0; i < n; i++ )

{

for (j = n - i; j > 1; j-- )

{

System.out.print( " " );

}

for (k = 0; k < i + 1; k++ )

{

System.out.print( "* " );

}

System.out.println();

}

You might be interested in
You are setting up a small network. The customer has decided to change his internet service provider (ISP) to EtherSpeed. The IS
salantis [7]

Home pc1 becouse it is the right one

3 0
2 years ago
you want to run your campaign for your dry-cleaning service across three different publishers, each with different video creativ
olganol [36]

The publisher, the user, and the ad server are all involved in the third-party ad serving (3PAS) paradigm of ad delivery.

Instead of serving an ad directly to the user's browser, the publisher instead sends the browser to an ad server where the ad is saved via an ad tag. Companion banners are image advertisements that play concurrently with other video or audio advertisements. In audio advertising, companion banners are shown to viewers as your audio ad is playing on a screen-equipped device, such as a smartphone or a computer. Go to your creative properties and open the Companion Creatives section. Select Add companions from the drop-down menu. You can add new creatives or assign already-existing ones.

Learn more about browser here-

brainly.com/question/28504444

#SPJ4

6 0
1 year ago
When Creating a game ( Which I Am, FPS ofc ) what are the basic rules would you want to add
Gnesinka [82]

Answer:

2 ig

Explanation:

5 0
3 years ago
Please help. 10 points
pickupchik [31]

Answer:

God Is Good He Will Always Help You He Is Good And Always Good!!

If God Is For Us Who Can Be Against us?? Romans 8:31

Explanation:

6 0
2 years ago
Read 2 more answers
You've formatted the first paragraph of a document. What button can you use to apply the formatting from the first paragraph to
Nata [24]
I think the answer is B. format painter 

3 0
3 years ago
Other questions:
  • ________ is used to store programs and instructions that are automatically loaded when the computer is turned on.
    14·1 answer
  • Which web browser below is natively available on a major operating system? ie 10 opera firefox chrome?
    12·1 answer
  • Which element in the PowerPoint application is not available in the Microsoft Word application?
    12·2 answers
  • "What is the database in which Windows stores all information about hardware, applications, users and system settings?"
    8·1 answer
  • What is the difference between "What I ought to do?" and "What kind of person should I be"?
    12·1 answer
  • after pouring concentrated disinfectant on larger drops or pools of blood how much contact time should be allowed before attempt
    8·2 answers
  • Whats with the bot spamming customer care numbers...kinda annoying when im trying to help people.
    12·1 answer
  • What is the Cycle of Dependency?
    14·1 answer
  • EXPLAIN WHY CRYPTOCURRENCIES ARE NOT RELIABLE.
    5·1 answer
  • A 4"x6" photo is digitized using 10,000 pixels. An 11"x7" photo is digitized using 30,000 pixels. Which image will have the bett
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!