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
slavikrds [6]
4 years ago
9

Write the pseudo-code of an algorithm that returns the sum of all integers in a list of integers. You may use the Pascal-like ps

eudo-code notation in the textbook, or the C-like notation I used in class, or any reasonable notation of your own, as long as you use its components consistently.
Computers and Technology
1 answer:
Arlecino [84]4 years ago
3 0

Answer:

//variable integer_list to hold a list of integers

DECLARE integer_list

ASSIGN values to integer_list

//variable sum to hold the sum of the elements in the list

DECLARE sum

ASSIGN zero to sum

//loop through the integer_list and sum all it's elements together.

for(int i=0; i<integer_list.size(); i++){

sum += interger_list.get(i)

}

//Show the result of the addition from the for loop

DISPLAY "The sum is " + sum

Explanation:

The above code uses some hypothetical programming language syntax. The second and third lines declare an arbitrary integer list and assign a set of values to it respectively.  

The fifth line declares a variable "sum" which will hold the result of summing all the elements in the list. The sixth line initializes "sum" to zero.

The for loop shown iterates through the integer list cumulatively summing its elements.

The result is displayed as written on line 12.

Hope it helps!  

You might be interested in
To incorporate media such as audio or video into a PowerPoint presentation, a user would first navigate to the _____ tab.
Nadya [2.5K]

The answer is the Insert tab or the recording tab in PowerPoint 2016

You can use the insert tab in most versions of the Microsoft PowerPoint applications to add media files to your presentations. However, we have the recording tab introduced in PowerPoint 2016. This tab can also be used to add a screenshot, a recording, or a video to a slide

3 0
4 years ago
Unless you specify otherwise, excel summarizes data by ____.
Lilit [14]
Unless you specify otherwise, excel summarizes data by  summing numeric data and counting data fields containing text.
<span> The most commonly used ways to </span><span>summarize data in excel are: pivot tables, autosum, sort, selection....
</span>
4 0
3 years ago
Why some programming languages use compilers and other interpreters ?​
Inga [223]

Answer:

A compiler takes a lot of time to analyze the source code. However, the overall time taken to execute the process is much faster. An interpreter does not generate an intermediary code. Hence, an interpreter is highly efficient in terms of its memory.

Explanation:

5 0
3 years ago
In a forest ecosystem, which of the following is the best example of a limiting factor for a rabbit population?
Verdich [7]

Answer:

A rise in the population of predators is followed by a decrease in the population of prey.

5 0
3 years ago
What are the outputs of these please help
larisa [96]

Answer:

monkey know monkey not tell

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • What piece of software tells the operating system how to use a specific hardware device?
    14·1 answer
  • Show the array that results from the following sequence of key insertions using a hashing system under the given conditions: 5,
    12·1 answer
  • PLEASE HELP! 2D Animation!
    12·1 answer
  • The first thing you should select if you're using an Address Block or Greeting Line is
    11·1 answer
  • Draw directed graphs representing relations of the following types.
    6·1 answer
  • Consumers may receive an​ e-mail, supposedly from their bank or credit card​ company, saying that their​ account's security has
    10·1 answer
  • Which is the short structure that Redis provides for the compact representation of Sets?
    10·1 answer
  • What makes this information systems environment unique? (3 points)
    7·1 answer
  • V. ASSESSMENT (Time Frame:
    7·1 answer
  • What are some innovations that television has undergone since its original invention ?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!