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
cluponka [151]
3 years ago
10

What is the output of the following code fragment? int i = 1; int sum = 0; while (i <= 11) { sum = sum + i; i++; } System.out

.println("The value of sum is " + sum); The value of sum is 65. The value of sum is 66. The value of sum is 55. The value of sum is 56.
Computers and Technology
1 answer:
valentina_108 [34]3 years ago
7 0

Answer:

The value of sum is 66

Explanation:

i = 1

sum = 0

while (i <= 11) {  

sum = sum + i;

i++;  

}

i = 1

  • sum = sum + i
  • sum = 0 + 1
  • sum = 1

i = 2

  • sum = sum + i
  • sum = 1 + 2
  • sum = 3

i = 3

  • sum = sum + i
  • sum = 3 + 3
  • sum = 6

i = 4

  • sum = sum + i
  • sum = 6 + 4
  • sum = 10

i = 5

  • sum = sum + i
  • sum = 10 + 5
  • sum = 15

i = 6

  • sum = sum + i
  • sum = 15 + 6
  • sum = 21

i = 7

  • sum = sum + i
  • sum = 21 + 7
  • sum = 28

i = 8

  • sum = sum + i
  • sum = 28 + 8
  • sum = 36

i = 9

  • sum = sum + i
  • sum = 36 + 9
  • sum = 45

i = 10

  • sum = sum + i
  • sum = 45 + 10
  • sum = 55

i = 11

  • sum = sum + i
  • sum = 55 + 11
  • sum = 66

i = 12 --> does not comply with the condition "i < = 11", the while loop is over

You might be interested in
Write a Python program that uses three variables. The variables in your program
ZanzabumX [31]

Answer:

animal = "animal"

vegetable = "vegetable"

mineral = "mineral"

print("Here is an ")

print(animal + ",")

print("a " + vegetable + ",")

print("and finally "mineral)

Have a nice day!

Please mark as brainiest :)

7 0
2 years ago
Why are computer simulations useful in studying phenomena in the universe?
amid [387]

Answer:

Explanation:

Computer simulations are helpful because they can handle the computation of a big number of variables, at the same time. The universe is a constantly changing place with many different variables changing other variables. Thus, a computer is ideal to simulate, or predict, real life phenomena because of its processing power.

7 0
2 years ago
How many accelerometers are there in an IRS system?
slega [8]

The number of accelerometers that are in an IRS system are three (3).

<h3>What is an IRS system?</h3>

IRS system is an abbreviation for inertial reference system (IRS) and it can be defined as a navigation system that is designed and developed to provide inertial navigation data to various user systems, especially by using a ring-laser gyro.

In the Aviation and Engineering filed, he number of accelerometers that are in an inertial reference system (IRS) system are three (3).

Read more on navigation system here: brainly.com/question/26052911

#SPJ12

5 0
2 years ago
Greg is the purchasing manager at a jeans-manufacturing company. He knows he could save his company money by using cheaper, thin
olasank [31]

Answer: B) Character

Explanation:

According to the question, character of Greg is depicted through the scenario as he is displaying his moral quality ,honesty and mind integrity through not providing low-quality product to his customers even though he has chance to save company money through buying shape material  .

Thus, he has good character to provide quality product and maintaining reputation and company as well as valuing his customers.                      

Other options are incorrect because fairness, community, expertise and competence are not the quality trait depicted through question's scenario. Thus, the correct option is option(B).

4 0
3 years ago
Three different numbers need to be placed in order from least to greatest. For example, if the numbers are ordered 9, 16, 4, the
Anna11 [10]

Answer:A

Explanation:

3 0
3 years ago
Other questions:
  • Part cost Calculator Modify the GUI in your program to look like the following GUI. To do that you need to add the following to
    13·1 answer
  • As the network engineer, you are asked to design an IP subnet plan that calls for three subnets. The largest subnet needs a mini
    14·1 answer
  • How do you mark peoples answer as the brainliest answer? I have trouble doing so. Please help!
    10·2 answers
  • Hard and soft skills can both be transferable skills. *<br><br> True<br><br> False
    5·2 answers
  • And then what happened,Paul Revere rhyme
    14·2 answers
  • Describe at least two other companies that are direct or indirect competitors to your company. Explain how you will differentiat
    15·1 answer
  • Why don’t the ads on Brainly load anymore
    14·2 answers
  • Where is 5G being used and how fast is it?​
    5·2 answers
  • PYTHON
    5·1 answer
  • How is scale depicted on a flat video screen?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!