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
steposvetlana [31]
3 years ago
6

Consider the following code segment. for (int a = 0; a < 10; a++) { for (int b = 10; b > a; b--) { System.out.print("#");

} } How many "#" symbols are printed as a result of executing the code segment?
Computers and Technology
1 answer:
Ket [755]3 years ago
6 0

Answer:

55

Explanation:

Given the codes as below:

  1.        for (int a = 0; a < 10; a++)
  2.        {
  3.            for (int b = 10; b > a; b--)
  4.            {
  5.                System.out.print("#");
  6.            }
  7.        }

There are two layer loops in the code. The outer loop (Line 1) will run for 10 iterations by traversing through a = 0 to a=9. However, the inner loop  (Line 3) will run for 10 + 9 +  8 + 7 +...+ 1 = 55 iterations.

Since the print statement is within the inner loop (Line 5) and therefore the number of printed "#" symbols is dependent on the number of iterations of the inner loop. There will be 55 "#" symbols printed.

You might be interested in
For an external usb hard drive attached to a computer, which is more suitable: a writethrough cache or a block cache
Charra [1.4K]

Disk access is way slower than memory access. Caching is a technique to improve the disk access time.  Block cache is a caching technique which reduces disk accesses time.  Here a portion of disk is bought to cache for reading and a modified blocks are first changed in cache but reflected in the disk at one go.  On the other hand with write through caching each modified block is written to cache and at the same time it is written to the disk.  Write- through caching requires more disk I/O so they can have a negative effect on the performance. 

6 0
3 years ago
Read 2 more answers
Susan wants to play the games that come with Windows on her computer, but they are not on the Start menu. What should she do in
ollegr [7]

Answer:

Search for the games in the search bar

Explanation:

5 0
2 years ago
List five applications field of a computer?​
True [87]

list five applications field of a computer?

answer= <em> </em><em>home</em><em> </em><em>,</em><em> </em><em>school</em><em>,</em><em> </em><em>h</em><em>o</em><em>spital</em><em>,</em><em> </em><em>bank</em><em>,</em><em> </em><em>super</em><em> </em><em>markets</em><em>,</em><em> </em><em>etc</em><em>.</em><em>.</em><em>.</em><em>.</em>

5 0
3 years ago
What is the purpose of the GETPIVOTDATA function?
Mrac [35]

Answer:to export the PivotTable data into another worksheet

Explanation:hope this helps :D

7 0
3 years ago
Read 2 more answers
You are working on a ticket for a user who cannot access the Internet from their PC. After troubleshooting, how do you confirm t
ki77a [65]
Could be anything?
Maybe you get an email from them on their PC, which means they have internet
8 0
2 years ago
Other questions:
  • Which of the following is an encryption tool that allows users to encrypt files and folders by simply right-clicking a given obj
    10·2 answers
  • To save the changes to the layout of a table, click the Save button on the _____.
    13·1 answer
  • Molly, a technician, has been tasked with researching an emulator for the software developers to test cross-platform application
    13·2 answers
  • Which of the following is true regarding data acquisition? Because data acquisition is often technical, the research team does n
    15·2 answers
  • _____the measuring instrument is not necssery​
    10·1 answer
  • Question 2 (2 points)
    6·1 answer
  • In 100 words or less, discuss why ethics is especially important for computer professionals, as it pertains to addressing profes
    5·1 answer
  • Expectation on Information Technology Fundamental​
    12·1 answer
  • If the starting address location changes, in which of the following cases, the program has to be recompiled? Select one: a. Both
    12·1 answer
  • if we try to use tail-recursive rules to implement non-tail-recursive rules, it will normally result in rules that are
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!