I don't understand how to write code for this in Java using nested for loops only. The official question is: write a program that produces the following hourglass figure using nested for loops?

I Don't Understand How To Write Code For This In Java Using Nested For Loops Only. The Official Question

Answers

Answer 1

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();

}


Related Questions

Match the following
image editing software
Web browsers
Computer Aided Design, or the use of software to aid in
1,
technical drawings and models
2. Information processed or stored by the computer
3. software that organizes a collection of data
also known as graphics software, this software enables a
4.
person to change or create visual images on a computer
fields on a screen used to search for specific information in a
5.
database
CAD
query
Web page
dota
6. Software used to browse the World Wide Web
a page on the World Wide Web that may contain text,
7
Images, audio, or video
database

Answers

Answer:

4

Explanation:

because your wanting something that's well edit an image

What type of network is a private network that can also be accessed by authorized external customers, vendors, and partners?

Answers

Answer:

extranet

Explanation:

An extranet is a controlled private network that allows access to partners, vendors and suppliers or an authorized set of customers – normally to a subset of the information accessible from an organization's intranet.

The contains the computer's "brain," the central processing unit (CPU).

Answers

Answer:

Inside the computer case, on the motherboard. Hope this helps!

Explanation:

Robert’s computer is not working properly. It has become too slow to respond to programs. What can he do to maintain his computer and help it function properly?

Answers

Answer: Utility Software

Explanation:

Utility software is software designed to help to analyze, configure, optimize or maintain a computer. It is used to support the computer infrastructure - in contrast to application software, which is aimed at directly performing tasks that benefit ordinary users.

Answer:

Utility software

Explanation:

When did the silent movie era end?
A.1919
B.1929
C.1939
D.1949

Answers

Answer:

The answer is 1929.

Pretty sure your answer is B. 1929

Which type of software can be used without paying a license fee and can be modified to add capabilities not realized by its originators? *
10 points
Application software
System software
Open-source software
Proprietary software

Answers

Answer:

Open Source software.

Answer:

open source software

Explanation:

The questions are from HTML. State whether the following statements are true or false. 1. HTML is the programming language. 2. Web page is the collection of website. 3. <marquee> tag is used to link the Hyper text. 4. Heading tag supports different levels from H1 to H6. 5. Attributes provide additional information to the HTML tags. 6. Empty tags must be closed with ending tag </>. ​

Answers

Answer:

true

Explanation:

hope this helps

How long are objective tests for FBLA-PBL events? Apex

Answers

Answer:

You will have 60 minutes to complete all objective tests. Each test has 100 multiple choice questions.

Explanation:

60 minutes to complete the objective test

Question 2 and 3 answer

Answers

Answer:

3=if you want to highlight text, move a cursor to the start of the line,hold the shift key, and then press a down arrow

evolution of new technology also increased the crime in our society explain​

Answers

Answer:

yes ,for sure evolution of new technologies also increased the crime in our society. Many cyber crime are occurring due to the use of new technologies. People can hack the data , transfer money from others account and so on . People are using new technology to harm others ,steal others data and information . It has given an opportunity to many people to do various crime easily .

A web developer overhears an executive’s username and password, and then uses it to download the company’s secret chocolate-chip cookie recipe. He makes the cookies at home and posts the recipe on his blog.

identity theft

corporate espionage

software piracy

sale of trade secrets

Answers

Answer:Sale of trade secrets

Explanation:

Just took it

Answer:

sale of trade secrets

Explanation:

Just took it edgen 2020 is correct

A web developer overhears an executive’s username and password, and then uses it to download the company’s secret chocolate-chip cookie recipe. He makes the cookies at home and posts the recipe on his blog.

trade

/trād/

the action of buying and selling goods and services.

adding transition slides to a presentation

Answers

Answer:

1. Select the slide you want to add a transition to.

2. Select the Transitions tab and choose a transition. Select a transition to see a preview.

3. Select Preview to see what the transition looks like.

To remove a transition, select Transitions > None.

what is considered an input and output peripheral?

Answers

Answer:

An input is any device that can put information into a computer, (keyboard, mouse, microphone, etc.) An output will take information out, (monitor, printer, speaker, etc.)

Which of the following is not a method for opening Word software? right clicking on the desktop and selecting "view" selecting the Start button and navigating through all programs selecting the Start button and navigating to the most recently used programs using an icon on the desktop

Answers

Answer:

right clicking on the desktop and selecting "view"

Explanation:

A word software enables us to create, edit  two or more documents at the same time and print documents, to write text, store it electronically, display it on a screen and modify it by entering commands, and then print it.

It enables you to draw graphs, and possibly even convert videos into a document.

Word software cannot be opened by right-clicking on the desktop and selecting "view".

Answer:

right clicking on the desktop and selecting "view" selecting the Start button

Explanation:

Word pad is a word processing software included with all versions of MS- Windows starting from Windows 95 to Windows 10. It is more better compared to Notepad and much simpler than Microsoft Word. Microsoft replaced the Microsoft write.

You cannot access word pad by clicking on the desktop and selecting "view", the simplest way to access Word pad is by clicking on the start button and then clicking on the word pad.

Nina's grades could be better. She gets about five hours of sleep every weeknight and ten hours per night on weekends. How much sleep should she get to better concentrate on schoolwork? Five to six hours every night nine to ten hours every night a total of forty hours a week a minimum of eighty hours a week

Answers

Answer:

B. Nine to ten hours every night

Explanation:

You need to have at least 8 hours of sleep and B makes the most sense cause then she gets enough sleep and enough time to study.

Answer:

9 to ten hour

Explanation:

It is implied in the AMS Climate Paradigm that components of Earth’s climate system (e.g., atmosphere, hydrosphere, cryosphere, geosphere, and biosphere) interact in a(n) ________ way as described by natural laws.

Answers

Answer:

orderly

Explanation:

The American Meteorological Society presents information, development, and an interdisciplinary approach towards the researches of atmosphere and hydrosphere. The goal of the society is intended towards developing a research-based idea covering the topics of atmosphere and science. The atmosphere, hydrosphere, cryosphere, geosphere, and biosphere are the components of the environment that helps in determining and analyzing the climatic condition of the Earth.

By using password-stealing software, ________ capture what is typed on a keyboard and easily obtain enough personal information. A) identity thieves B) keyloggers C) hackers D) cyberstalkers

Answers

Answer:

B) Keyloggers

Explanation:

Keyloggers are malicious softwares used by hackers to secretly record and capture keystrokes on a person's computer when they are using it. This enables the hackers steal sensitive data like passwords, bank details, address etc. Keyloggers are one of the oldest forms of cyber threats used by cybercriminals to spy on unsuspecting users. Keyloggers can be sent through links to access. computer o directly installed with access to the computer.

Which term is used to describe individuals who want to attack computers yet lack the knowledge of computers and networks needed to do so?

Answers

Answer:

script kiddies

Explanation:

script kiddies is used to describe individuals who want to attack computers yet lack the knowledge of computers and networks needed to do so

A script kiddie is used to describe individuals who want to attack computers yet lack the knowledge of computers and networks needed to do so.

What is a script kiddie?

A script kiddie, or “skiddie,” is known to be when a person is said to lacks programming knowledge and often uses existing software to bring about an attack.

Therefore, A script kiddie is used to describe individuals who want to attack computers yet lack the knowledge of computers and networks needed to do so.

Learn more about script from

https://brainly.com/question/2438409

#SPJ9

Joe's computer crashed and I was looking for a replacement which of the following criteria is less important.Ram,money, color, usage ​

Answers

Answer:

color

Explanation: nobody cares what color it is how it works

Colour is the less criteria as Joe's computer crashed, and he was looking for a replacement. Hence, option C is correct.

What is meant by computer crashed?

A computer crash occurs when an operating system or program stops functioning properly. When: Hardware has had an irreparable failure.

Computer crashes are the result of hardware or operating system errors. Even though software errors are unquestionably more common, hardware errors can still be quite harmful and are more difficult to spot. A computer cannot function if certain hardware components are malfunctioning.

A crash or system crash occurs when a computer program, such as an operating system or software application, stops functioning properly and exits. A computer cannot operate without a number of hardware parts working properly.

Thus, option C is correct.

For more details about  computer crashed, click here:

https://brainly.com/question/4701800

#SPJ2

Using the drop-down menus, correctly match the name of the person with the computer-programming
innovation
In 1975,
founded Microsoft, which released Altair BASIC, the first
programming language for personal computers.
found the first computer bug in 1947, and invented the concept of a compiler in
1952
v led a team at IBM that developed FORTRAN and its compiler in 1957
developed C++ programming language, and published the reference guide
in 1987
released the Python programming language.

Answers

Answer:

1. Bill Gates and Paul Allen

2. Grace Murray Hopper

3. John Backus

4. Bjarne Stroustrup

5. Guido van Rossum

where can I watch all harry potter movies for free?
and I know this isn’t exactly the question I should be asking here but pls help me and don’t give me virus

Answers

Answer:

Ive streamed them before on DailyMotion

On a webpage, a _____ provides supplemental material such as social networking feeds and ads. Group of answer choices footer sidebar header navigation bar

Answers

Answer:

sidebar

Explanation:

The part of the webpage that is being described in this question is known as a sidebar. These are the far left/right sides of the webpage and are usually used for networking feeds, ads, related information, major points of the main page, biographical info, as well as persuasive information. This section of the webpage serves two main purposes to provide the viewer with advertisements and to encourage the reader to read the more detailed main article.

The flowchart that show the sequence of logical operations executed by a computer is called a: A. Systems flowchart B. Operations flowchart C. Program flowchart D. Decision flowchart

Answers

Answer:

It is called a Program Flowchart.

Explanation:

Two fingers are assigned to six letters each. What fingers are they?

Answers

Answer:

The left and right index finger

Explanation:

Left index finger: R, T, F, G, C, V

Right index finger: Y, U, H, J, B, N

What is output?
C = 1
sum 0
while (c < 10):
c = c + 3
sum
sum + C
print (sum)

Answers

Answer:The French and Dutch settlements differed from the Spanish colonies in that they were created mainly to trade and develop industries, while the Spanish were primarily concerned with gold and silver excavation, and then later with sugar exportation.

Explanation:The French and Dutch settlements differed from the Spanish colonies in that they were created mainly to trade and develop industries, while the Spanish were primarily concerned with gold and silver excavation, and then later with sugar exportation.

​ In a systems development life cycle (SDLC) model, the purpose of the _____ is to build a logical model of the new system.

Answers

Answer:

Systems analysis phase.

Explanation:

In a systems development life cycle (SDLC) model, the purpose of the systems analysis phase is to build a logical model of the new system.

In the systems analysis phase, the system developer examines or analyzes the information or data about the requirements of an end-user, which are then implemented to achieve the organizational set goals and objectives.

Hence, systems analysis refers to the process of gathering data or factual informations, understanding processes, problem identification and suggestions of probable solutions for an effective and efficient functioning of the system.

Given an "out" string length 4, such as "<<>>", and a word, return a new string where the word is in the middle of the out string, e.g. "<>". Note: use str.substring(i, j) to extract the String starting at index i and going up to but not including index j.
makeOutWord("<<>>", "Yay") → "<>"
makeOutWord("<<>>", "WooHoo") → "<>"
makeOutWord("[[]]", "word") → "[[word]]"

Answers

Answer:

The following are the answer to this question.

Explanation:

In the given code, a "makeOutWord and word" is already used to hold some value. In this code, we define a string method "makeOutWord" that accepts two string variables "out and the word" in its parameter.

Inside the method, a return keyword is used that uses the string variable "out and the word" with the "substring" method, this method is used to returns a new string from an old string value, and it also uses the "word" string variable for the return value.  

please find the attached file for code:

Can you get accurate
information from social
media?
A. Sometimes
B. Usually
C. Always
D. Nevali

Answers

Answer:

The answer is B.usually

Explanation:

We usually get accurate information from social media cause sometime they also tell us the fake news...

Yes, it is possible to get accurate information from social media "sometimes" (Option A)

How accurate is the information gotten from social media?

The accuracy of information obtained from social media can vary widely.

While social media platforms can be a valuable source of news, updates, and insights, the information shared is often user-generated and may not always be verified or fact-checked.

Therefore, the accuracy of information on social media is not guaranteed, and it is essential to cross-reference and verify information from reliable sources before considering it as entirely accurate.

Critical evaluation and discernment are crucial when using social media as an information source.

Thus, Option A is the right answer.

Learn more about social media at:

https://brainly.com/question/1163631

#SPJ6

Can anyone help me
I will make you a brainalist

Answers

Answer:

Explanation:

Exercise A:

1. A table.

2. Categorical.

3. Access.

4.Queries.

5.ACCDB extension.

Exercise B:

1. Insert Tab.

2. DoCmd.Quit method.

3.Navigation Pane.

4. Modify table data.

5.The top pane and the bottom pane.

Hope this helped you!

Different types of names given to explicit convertion in java

Answers

Answer:

Different types of name given to explicit conversation in java are

1. Automatic

2. Explicit

Other Questions
3. Enzymes, which influence chemical reactions, are complex types of:*carbohydratesO proteinsnucleic acidslipidsoccobaridolysaccharides as The chart compares transportation options. Option A to buy new has a monthly payment of 338 dollars for 60 months, up-front cost of 2,500 dollars, and 275 dollars a month for insurance and gas. Option B to lease new has a monthly payment of 229 dollars for 36 months, up-front cost of 3,925 dollars, and 275 dollars a month for insurance and gas. Option C to buy used has a monthly payment of 250 dollars for 36 months, up-front cost of 2,000 dollars, and 225 dollars per month for insurance and gas. What is a main disadvantage of leasing a vehicle compared to buying a vehicle? the up-front cost the monthly payments the length of payments the cost of insurance and gas Karl Marx's economic therories resulted in which global change? A ball easily moves but not a bus when we push them. why? Solve equation. -3x + 1 + 10x = x + 4 Answer: x=1/2(for anyone who needs the answer) What is the variable called tha is changed Explain how this quote can be applied in our daily lives. There is nothing on this earth more to be prized than true friendship. -Saint Thomas Aquinas which expression is equivalent to x^6 - 5 [tex]\huge{\gray{\sf Question:} }[/tex]A body describes simple harmonic motion with an amplitude of 5 cm and a period of 0.2 s. Find the acceleration and velocity of the body when the displacement is (a) 5 cm, (b) 3 cm and (c) 0 cm. which graph represents the solution to the inequality y What correct equation to find the length of DF in the following diagram What was the main cause of the Boston Massacre? Ms. Smith has 28 sixth graders and 35 seventh graders for Math. If she wants to break the two grades into identical groups without any students left over, how many students will be in each group? * Find 7/8 divided by 1/3 why is it wrong to get treatment from dhamis and jhankri? What is a text connection in ELA, Google didn't have a clear answer. Which term refers to a style that is currently the most popular with consumers? A. season B. trend C. style D. fashion Pls halp due today >_< Thank you What is the answer for 10-6(5-2y) Click to fix any capitalization errors below. Click "Submit Answer" if there are none. for her project, Dr. Caitlin Snow is researching what she calls the "Coolest event in scientific history."