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
fenix001 [56]
4 years ago
5

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

.println("The value of sum is " + sum);
Computers and Technology
1 answer:
Marianna [84]4 years ago
4 0

Answer:

The value of sum is 120

Explanation:

Consider the same code snippet numbered below:

  1.        int i   =    1;
  2.        int sum = 0;
  3.        while (i <= 15) {
  4.            sum = sum + i;
  5.            i++;
  6.        }
  7.        System.out.println("The value of sum is " + sum);
  8.    }

Line 1 Initializes an int variable i to 1

Line 2 creates another int variable sum, sets it to 0

line 3 has a while statement that executes until i becomes equal to 15

In line 4 the current value of sum is continuously added to i as long as the condition in line 3 stays true.

Line 5 ensures there is no infinite loop by increasing i by 1

At line 7 The value of the variable sum will be 120. This is the sum of numbers from 1 to 15. and it is printed to the console.

You might be interested in
Which of the following might indicate a source on the internet is NOT reliable?
Evgesh-ka [11]
Were are the choices or do you want us to answer it on our own?
 
7 0
3 years ago
If Chris has a car liability insurance, what damage would he be covered for
andrezito [222]

Automobile liability insurance covers damage that Chris would do to other people’s property.

Liability insurance is a type of insurance that covers the other person, it does not covered the insured person. This insurance would cover items like damage to someone else’s car or their personal property.

6 0
3 years ago
Name the hardware component that performs each of the following functions (1) performs calculation and/or comparisons (2) holds
mariarad [96]
1. The CPU (central processing unit) does the calculations and comparisons that make the computer work. They use millions of transistors to do so.
2. The ROM holds all the programs on the computer. This is most often the "C" drive.
3. The ROM also has the operating system that is used to run the computer.
6 0
3 years ago
The Recycle Bin exists as a metaphor for throwing files away, but it also allows a user to retrieve and restore files. Once the
Karolina [17]

Answer:

a) INFO2 file

Explanation:

When a file is deleted and moved to the Recycle Bin generates its own records inside a INFO2 file. These files save data from the deleted file, so it can be analyzed later. The size of a INFO2 file is 800 bytes usually.

The data saved into this files is:

  • Original location of the removed file
  • Date and time when deleted
  • Physical size of the deleted file
6 0
3 years ago
Add definitions for the following keywords to your glossary of words.
lianna [129]

Answer:

wifi=a facility allowing computers, smartphones, or other devices to connect to the internet or communicate with one another wirelessly within a particular area.

bandwidth=a range of frequencies within a given band, in particular that used for transmitting a signal.

The bit is the most basic unit of information in computing and digital communications. The name is a contraction of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented as either "1" or "0", but other representations such as true/false, yes/no, +/−, or on/off are commonly used.

A megabit is a unit of digital information with prefix mega (symbol M). And it is equal to one million bits. It also means 106 bits or 1,000,000 bits. ... The unit symbol of megabit is Mbit. You can convert megabit to other units of data using our tool.

The gigabit is a multiple of the unit bit for digital information or computer storage. ... 1 gigabit = 109bits = 1000000000bits. The gigabit has the unit symbol Gbit or Gb. Using the common byte size of 8 bits, 1 Gbit is equal to 125 megabytes (MB) or approximately 119 mebibytes (MiB).

The Emergency Broadband Benefit is an FCC program to help families and households struggling to afford internet. The Emergency Broadband Benefit is limited to one monthly service discount and one device discount per household.

Buffering is the process of preloading data into a reserved area of memory that's called a buffer. In the context of streaming video or audio, buffering is when the software downloads a certain amount of data before it begins playing the video or music.

5 0
3 years ago
Other questions:
  • Which part of color theory deals with how colors on a web page relate to each other?
    11·2 answers
  • According to the text, what have humans used throughout history to overcome physical limits?
    12·1 answer
  • In a formatted text file, ________ signal(s) the beginning and end of a formatting command.
    12·1 answer
  • Someone please help me with the right answer please
    13·1 answer
  • How to attach a picture on brainily?
    8·1 answer
  • In a typical e-mail address, the \"host\"is
    5·1 answer
  • Mô tả những lợi ích của việc sử dụng đa xử lý không đồng nhất trong một hệ thống di động
    8·1 answer
  • Who here has a crush on jk from bts but feels more mature than him
    10·2 answers
  • (python) Given the formula for conversion from Celsius to Fahrenheit
    10·1 answer
  • Pls help help me is good help me helping is very good
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!