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]
3 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]3 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
What is a sound wave
solmaris [256]

Answer:

A wave of sound!

Explanation:

sound waves are sound but sound comes in different wavelengths

7 0
3 years ago
Read 2 more answers
Rows are typically represented by _______ and contain data for individual records
Agata [3.3K]
Records, data and tables are terns used in database software.Rows are typically presented by numbers and contain data for individual records. Records are used in database software to organize data. They are stored in tables.
4 0
3 years ago
When Clara accesses the programs and documents on her computer by way of icons, she is said to be employing
julsineya [31]
Your answer would be D, graphical user interface. Hope this helps!
5 0
3 years ago
Read 2 more answers
For a Know Simple query, a Fully Meets rating can be given if the result does not display the answer, but it is at the very top
tekilochka [14]

Answer:

For a Know Simple query, a Fully Meets rating can be given if the result does not display the answer, but it is at the very top of the landing page.

B) False

Explanation:

  • A know simple query is special form of a know query. The query which are intended to know something like what is the length of pitch of a cricket ground?
  • A know simple query is such a know query that can be described in very little amount of words.
  • A know simple query would only get the fully meet ratings if the result shown has the result in a special result block or it is shown upfront. You don't need to open a link to get the answer in such scenario.

6 0
3 years ago
Eric is working on a computer that has a device driver error. Eric can find the name of the device driver however the actual dev
wel

Answer:

Windows\System32\drivers folder.

Explanation:

Eric operates on such a computer which has some failure on system's driver. Although the specific system may not be operational, he will locate the system driver title. Inappropriately he has no Connectivity to the internet.

Windows\System32\drivers directory could move to him to show the file of the system driver. Thus, the following answer is correct according to the given scenario.

3 0
3 years ago
Other questions:
  • What type of data visual would you use to illustrate trends over time? Gantt chart Bar graph Line chart Scatter diagrams
    5·1 answer
  • Telecommunications is the transmission of voice and video as well as data and usually implies transmitting a longer distance tha
    5·1 answer
  • Paragraph on how atms work
    15·1 answer
  • Which of these are characteristics of compiler software? Check all of the boxes that apply. Compiler software compiles code. Com
    11·2 answers
  • Which of the following is not a common network architecture type?
    9·1 answer
  • Complete the getNumOfCharacters() method, which returns the number of characters in the user's string. We encourage you to use a
    15·1 answer
  • When adding a background to a Web page, it can be _____. a. a solid color b. a fill effect c. an image d. all of the above
    12·1 answer
  • Communications that take the form of electronic junk mail or unsolicited e-mail are referred to as
    13·2 answers
  • Your employer's right to electronically monitor you is an issue of ____.
    13·1 answer
  • Please Help! <br> I need good Anime to watch!
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!