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
Naddik [55]
3 years ago
14

Given a scanner reference variable named input that has been associated with an input source consisting of a sequence of integer

s and an int variable named total, write the code necessary to add all the integers in the input source and place their sum into total.
Computers and Technology
2 answers:
DedPeter [7]3 years ago
7 0
The answer is total = 0;while(input.hasNextInt()){total += input.nextInt( );}   Given a scanner reference variable named input that has been associated with an input source consisting of a sequence of integers and an int variable named total, The code necessary to add all the integers in the input source and place their sum into total is :                                                  total = 0;while(input.hasNextInt()){total += input.nextInt( );}   
liq [111]3 years ago
7 0

Answer:

Following are the code written in the Java Programming Language.

total = 0;   //set integer type variable and initialize to 0

while(input.hasNextInt()){   //set the while loop

total += input.nextInt( );  //code is here

}

Explanation:

Here, in the following code create the reference scanner class object i.e., "input".

  • Then, we set integer data type variable "total" and initialize 0 in it.
  • then, we set the while loop and pass the following condition "input.hasNextInt()".
  • Then, we add all integer values and store their sum in the variable "total".
You might be interested in
WHO WANTS TO PLAY AMONG US
Elza [17]

Answer:

Explanation:

ME

8 0
2 years ago
Read 2 more answers
What allow you to write alphas on a computer keyboard
lions [1.4K]

Answer:

"To create any of these Greek letters using the Alt codes, simply press the "Alt" key while simultaneously typing the listed number. For example, to create the Greek letter Alpha (α), press the "Alt" key and type 224 using the keypad at the right side of your keyboard." - GOOGLE

5 0
2 years ago
is skill in using productivity software, such as word processors, spreadsheets, database management systems, and presentation so
Digiron [165]

Answer:

It is general knowledge

Explanation:

What you covered is general knowledge and the entrance to computer science.

4 0
3 years ago
According to Amdahl's Law, what is the speedup gain for an application that is 60% parallel and we run it on a machine with 4 pr
rodikova [14]

With four processing cores, we get a speedup of 1.82 times.

<h3>What is Amdahl's Law?</h3>

Amdahl's law exists as a formula that provides the theoretical speedup in latency of the implementation of a task at a fixed workload that can be expected of a system whose resources exist improved.

Amdahl's law exists that, in a program with parallel processing, a relatively few instructions that hold to be completed in sequence will have a limiting factor on program speedup such that adding more processors may not complete the program run faster.

Amdahl's law stands also known as Amdahl's argument. It is utilized to find the maximum expected progress to an overall system when only part of the system exists improved. It is often utilized in parallel computing to indicate the theoretical maximum speed up utilizing multiple processors.

Hence,  With four processing cores, we get a speedup of 1.82 times.

To learn more about Amdahl's Law refer to:

brainly.com/question/16857455

#SPJ4

6 0
1 year ago
Technological developments over the past two decades, such as the rise of the internet and email, have
enyata [817]
Change our live because....
7 0
3 years ago
Read 2 more answers
Other questions:
  • Is a network traffic management device used to connect different network segments together?
    9·1 answer
  • What is the name of the domain controller database that windows server 2016 uses to store data about user access and resources o
    10·1 answer
  • What kind of memory modules include registers between the system’s memory controller and the module’s memory chips, registers th
    7·2 answers
  • Which magazine can help the public to determine the best technology to buy?
    14·1 answer
  • software that provides capabilities common across all organizations and industries is known as ________ software.
    15·2 answers
  • Evonka is listening to music from an online music provider (such as Pandora or Jango). She builds a list of music preferences, i
    15·1 answer
  • The spreadsheet below shows a list of fruits with their calorie count, grams of sugar, dietary fiber, and protein. Which set of
    8·1 answer
  • Which of the following sentences use personification 
    9·1 answer
  • PLEASE HELP! I accidently looked up a link, and now this same link keeps popping up everywhere, how do I stop this!?!? please he
    13·2 answers
  • Someone put malware on your computer that records all of your keystrokes. what aspect of security was primarily attacked? choose
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!