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
Alenkasestr [34]
3 years ago
6

Which pattern is produced by the following code? for (int i = 1; i <= 6; i++) { for (int j = 6; j >= 1; j--) System.out.pr

int(j <= i ? j + " " : " " + " "); System.out.println(); } Pattern A Pattern B Pattern C Pattern D 1 1 2 3 4 5 6 1 1 2 3 4 5 6 1 2 1 2 3 4 5 2 1 1 2 3 4 5 1 2 3 1 2 3 4 3 2 1 1 2 3 4 1 2 3 4 1 2 3 4 3 2 1 1 2 3 1 2 3 4 5 1 2 5 4 3 2 1 1 2 1 2 3 4 5 6 1 6 5 4 3 2 1 1
A. Pattern A
B. Pattern B
C. Pattern C
D. Pattern D
Computers and Technology
1 answer:
Brrunno [24]3 years ago
3 0

Answer:

              1                                                                                                                    

           2 1                                                                                                                    

        3 2 1                                                                                                                    

     4 3 2 1                                                                                                                    

  5 4 3 2 1                                                                                                                    

6 5 4 3 2 1

Explanation:

I do not now know which option it corresponds but the shape should look like above.

The logic is following;

There is a nested for loop. The inner loop prints the value of j, when j is smaller than or equal to i. Otherwise, it prints a space.

For example, in the first iteration i = 1 and j starts from 6.

i = 1, j = 6 -> print space

i = 1, j = 5 -> print space

i = 1, j = 4 -> print space

i = 1, j = 3 -> print space

i = 1, j = 2 -> print space

<u>i = 1, j = 1 -> print j</u>

You might be interested in
Explain the main functions of the CPU.
bixtya [17]
The CPU performs basic arithmetic, logic, controlling, and input/output (I/O) operations specified by the instructions in the program. This contrasts with external components such as main memory and I/O circuitry, and specialized processors such as graphics processing units (GPUs).
4 0
2 years ago
Read 2 more answers
Do you think our attitude (whether positive or negative) is something we are born with or that we have power to control within o
Rom4ik [11]

Answer:

I think your attitude is something you develop

Explanation:

I think you develop your attitude and that effects the way you respond to something like if you've got a bad attitude and something bad just happened you tend to lash out and get mad or something but if you have good attitude and something bad just happened you would either brush it off or stay calm and fix it and there are a ton of different ways people react to different situations those were just examples I think your attitude is effect by the way you were raised if you were raised in a bad family your attitude would probably be mean or something.

5 0
3 years ago
Suppose that TCP's current estimated values for the round trip time (estimatedRTT) and deviation in the RTT (DevRTT) are 400 mse
Masja [62]

Answer:

617.5 msecs, 580.89 msecs, 582.36 msecs

Explanation:

Lets look at the following formulas:

EstimatedRTT = α * SampleRTT+(1- α) * EstimatedRTT

DevRTT = β * | SampleRTT- EstimatedRTT|+(1- β)* DevRTT

TimeoutInterval = EstimatedRTT +4* DevRTT

Given values are:

EstimatedRTT = 400 msec

DevRTT = 25 msec

α = 0.125

β = 0.25

After the first RTT estimate: (210)

EstimatedRTT = 0.125 * 210 + (1 - 0.125) * 400 = 376.25 msecs

DevRTT = 0.25 * |210 - 376.25| + (1 - 0.25) * 25 = 60.3125 msecs

TimeoutInterval = 376.25 + 4 * 60.3125 = 617.5 msecs

After the second RTT estimate: (400)

EstimatedRTT = 0.125 * 400 + (1 - 0.125) * 376.25 = 379.218 msecs

DevRTT = 0.25 * |400 - 379.218| + (1 - 0.25) * 60.3125 = 50.42 msecs

TimeoutInterval = 379.218 + 4 * 50.42 = 580.89 msecs

After the third RTT estimate: (310)

EstimatedRTT = 0.125 * 310 + (1 - 0.125) * 379.218 = 370.56 msecs

DevRTT = 0.25 * |310 - 370.56| + (1 - 0.25) * 50.42 = 52.95 msecs

TimeoutInterval = 370.56 + 4 * 52.95 = 582.36 msecs

5 0
3 years ago
30 POINTS!!
bulgar [2K]

Answer:

online

the answer is online

7 0
2 years ago
write a BASIC program to calculate the total saving of a man if he earns $10,000 per month and spends 20% on food,15% on childre
Tomtit [17]

10%+20%+15%+20%= 65%

65/100 × 10000

6500

3 0
3 years ago
Other questions:
  • True or false? You can test your marketing emails in different email clients from within the email editor.
    10·1 answer
  • Plz answer these questions...those who give answer get the brainliest......hurry up..!!!​
    14·1 answer
  • PLEASE HELP!!!!! David has gone to the Niagara Falls with his camera. He wants to click photos of the people around him and also
    11·2 answers
  • Hi! I'm Kayla! I was wondering who does homework on the weekends... anybody?? I guess almost everyone, including me. Anyways, le
    13·2 answers
  • Count positive and negative number and compute the average. The program will have the user input an unspecified number of intege
    6·1 answer
  • Which of the following are considered transactions in an information system?
    13·1 answer
  • Who was the first president
    6·2 answers
  • Which sentence(s) below are true?a. IP stands for Internet Protocol.b. In most home networks IP addresses are assigned by the In
    6·1 answer
  • How should you mark the query if it is a valid one?
    9·1 answer
  • The software that requests mail delivery from the mail server to an Internet device is known as mail ____ software.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!