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
Alex writes down a string with four digits. (Since this is a string, not a number, it can start with a $0.$ For example, Alex co
Artist 52 [7]

Answer: The answers to all parts of this question are based on "automatic string". The condition is also provided which states that the string the machine outputs is the same string (4-digit string) which is fed to the machine as input.

Explanation: (a) The string will not remain automatic string if it contains a digit greater or equal to $5$. As we know that machine should print the same string which is fed into it. In this case the machine will insert a 0 in place of $5$. So the number is inserting a 0 when it is output by the counting machine. For example if we input $2152$ machine will print "$0120$" which shows that the digits are not the same as fed to the machine. If we take string $0702,$ which is given in the question, we see that machine prints out "$2010$" which means that number is inserting a 0 so automatic string cannot contain a digit greater than $5$

(b) The same answer as given in (a). For example the if we write $4220$ machine prints out "$1020$".  So the automatic string cannot contain $4.$

(c) This is a bit tricky as machine count the digit $3$. Lets take an example string $3303$. the machine prints out "$1003$". It counts three BUT its not an automatic string because the string printed out is different from the string that was fed to the machine. So automatic string cannot contain $3.$

(d) Now we know that an automatic string cannot contain digits 3,4,5 and above. So it can contain digits 0,1 and 2 with 0 at the end as the automatic string cannot contain digit 3 or above.Lets take a few examples of strings with combinations of 0,1 and 2 to check if they are automatic strings.

  • $1220$ the machine prints $1120$ which is not the same as fed into machine so its not an automatic string.
  • $2020$ the machine prints out "$2020$". Its 2 times "$0$", 0 times "$1$",2 times "$2$" and 0 times "$3$" which is the same as fed to machine so $2020$ is an automatic string.
  • $1210$  is an automatic string as the machine prints out "$1210$" which is the same string fed to machine.
8 0
3 years ago
The files in James's computer were found spreading within the device without any human action. As an engineer, you were requeste
krok68 [10]

This type of infection is this a characteristic of a computer worm

For better understanding, lets explain what computer Worms means.

  • Computer Worm are commonly referred to as an independent program that often replicates or double itself by copying a fraction of itself onto another computer. They often exit in two forms. They are:

  1. Network Worm is a type of computer worm that replicates or copies different fraction of itself to computers linked together in known network.
  2. Host Worm is a type of computer worm that replicates or copies itself to another computer in a network and later on remove or deletes itself completely from the previous computer in which it was in.
  • Computer worm are capable of replicating themselves without human intervention.

Learn more about computer worm from

brainly.com/question/19631265

4 0
3 years ago
What are the primary benefits of relying on systems development standards?
Sunny_sXe [5.5K]

Answer:

The benefits of relying on System Development Standards is explained below.

Explanation:

There are many benefits of having a Well Defined Systems Development. It helps in having a pre - planned and well defined structure before the project starts. It helps in having a Clear view of the whole project and also each phase of the whole System Development. It helps in having an understanding of cost required and the revenues generated at each phase of the whole system development. It helps in having an understanding of the goal of each phase and procedures need to be followed for that particular goal. It also helps in having the quality checked and the improvements need to be made for the desired quality.

3 0
3 years ago
A counter is a tool used to measure the number of times people visit a Web site. true or false?
Liono4ka [1.6K]

True.

It doesn't measure unique users, so you can just hit refresh and the counter keeps going up...

5 0
4 years ago
PYTHON ERROR, PLEASE HELP I'LL GIVE BRAINLIEST TO WHOEVER HELPSSSS
cricket20 [7]
U put too many brackets on the second to last line at the end
6 0
3 years ago
Other questions:
  • Using the _______ list, you can select the number of photos that will appear on each slide.
    14·1 answer
  • Web-based e-mail like Hotmail is an example of three-tier client-server architecture that provides access to e-mail messages. Tr
    7·1 answer
  • What is an umbrella of software programs that may include​ CAD/CAM, product​ routing, maintenance, and other product​ concerns?
    11·1 answer
  • Which statement accurately compares the restart at 1 and continue numbering featured of word
    15·2 answers
  • Considering current online newspaper editions and the characteristics of digital age media, how do you think newspaper design mi
    7·1 answer
  • Greg is the purchasing manager at a jeans-manufacturing company. He knows he could save his company money by using cheaper, thin
    13·1 answer
  • What tag is used to contain information about a web page, such as the title and related pages?
    12·1 answer
  • Which of the following statements is true about DVI connectors? *
    10·1 answer
  • Factoring is the revers of​
    14·1 answer
  • Edra kinsman is the sales manager for narbonne suites hotel chain, which has locations in washington, oregon, idaho, and montana
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!