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
You want to allow members of the users group to use fdisk on the /dev/sda drive (and only that drive) and to use the yum command
masya89 [10]

Answer:

su ,sg and sudo command.

Explanation:

Whenever the user needs to enable workgroup mates should use fdisk including just that disk on both the /dev / sda disk, using the following command to update and configure the following packages. Thus he uses the command su, sg, and sudo.

So, the following commands are required according to the following statement.

6 0
3 years ago
While ________ is centered on creating procedures, ________ is centered on creating objects. Procedural programming, class progr
AlexFokin [52]

Answer

Procedural programming, Object-oriented programming

Explanation

Procedural programming is a type of computer programming language that specifies a series of well structured steps and procedures  within its development period of time. It contains a systematic order of statements, functions and commands to complete a computational task or program. It is centered on creating procedures. While object oriented programming is a programming language that is centered on creating objects rather that actions and data rather than logic.. It has four principles which are inheritance, polymorphism, abstraction and Encapsulation


4 0
3 years ago
Which options are available in the Conditional Formatting dialog box? Check all that apply.
IrinaVladis [17]

Answer:

There are several options within this dialog box for applying Conditional Formatting ☼ Click the desired option under the Select a Rule Type list. ☼ The bottom portion of the dialog box will change depending on the Rule Type that was selected. ✞ Click Format Only Cells That Contain under Select a Rule Type

6 0
2 years ago
Read 2 more answers
I think i have a virus on my computer what am i supposed to do
patriot [66]

Answer:

call like a phone or computer company and ask wjat thry can do

4 0
3 years ago
A _______ is used to analyze and summarize your data without graphical support. A. PivotChart B. PivotTable C. chart D. table
Norma-Jean [14]
B. pivot table................................................
3 0
3 years ago
Other questions:
  • For a typically large organization how many dns servers should you install
    5·1 answer
  • The operations planning practice of inputting sales forecasts into computer software that accurately predicts the amount and tim
    6·1 answer
  • Should organizations that promote free trade have environmental or social checks and balances?
    14·1 answer
  • What is an effective way to assess user requests for additional features and functions
    10·1 answer
  • Media messages are communicated through which of the following:
    8·2 answers
  • What was the original motivation for developing the internet?
    7·1 answer
  • Give 4 examples of mnemonic codes, and what do they do?
    15·1 answer
  • When LDAP traffic is made secure by using Secure Sockets Layer (SSL) or Transport Layer Security (TLS), what is this process cal
    9·1 answer
  • What is the first phase of the project process?
    14·2 answers
  • Keegan has a hard drive that he wants to connect externally to his laptop. Which two ports can he connect the external hard driv
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!