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
According to the video, what are some concerns of Webmasters? Check all that apply.
zheka24 [161]

Answer:

A.how fast the website can be accessed

E.the time it takes for elements on a website to download

F.website security and privacy

Explanation:

5 0
2 years ago
Read 2 more answers
When will it be determined whether or not a donor's organs are fit for recovery and transplantation?
myrzilka [38]
Organ viability is determined when a person is declared brain dead, so B.

4 0
3 years ago
Read 2 more answers
Which type of infrastructure service stores and manages corporate data and provides capabilities for analyzing the data
Katena32 [7]

Answer:

Data management.

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to effectively and efficiently create, store, modify, retrieve, centralize and manage data or informations in a database. Thus, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Generally, a database management system (DBMS) acts as an intermediary between the physical data files stored on a computer system and any software application or program.

Hence, a database management system (DBMS) is a software that enables an organization or business firm to centralize data, manage the data efficiently while providing authorized users a significant level of access to the stored data.

In conclusion, data management is a type of infrastructure service that avails businesses (companies) the ability to store and manage corporate data while providing capabilities for analyzing these data.

7 0
3 years ago
To download a webpage, the web browser copies files and transfer them to your ____
Ganezh [65]

Computer is your best answer.


If you download the files, they will show up either on your computer home screen, or in the 'downloads' section of your computer files.



hope this helps

7 0
3 years ago
Read 2 more answers
What does it mean when a red squiggly line appears under a typed word? How do we fix it?
Alenkinab [10]
That means the device is programmed to mark the word as grammatically incorrect, if you double tap the word there should be a correct suggestion of the word instead. This may not always be the right one tho, ask someone experienced if you’re unsure.
3 0
3 years ago
Other questions:
  • 5. Which of the following is a Windows feature that allows you to temporarily store text?
    13·2 answers
  • What does the int size = sizeof buffer / sizeof * buffer means ?
    7·1 answer
  • An algorithm written out in plain English statements is called __________.
    8·1 answer
  • Write a python program that should determine from the range you choose to enter :
    9·1 answer
  • What term is commonly used to refer to HTML formatting?
    5·1 answer
  • Use Spreadsheet Functions and Formulas
    6·1 answer
  • Anyone know what the very first question that was sent on brainly is?
    15·2 answers
  • 9. Lael wants to determine several totals and averages for active students. In cell Q8, enter a formula using the COUNTIF functi
    9·1 answer
  • Need help:(!!!! I’ll mark brainliest if correct
    5·1 answer
  • A user calls to complain that her computer is behaving erratically. Some days it functions correctly, and other days, it crashes
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!