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
A ___________ organizes related commands together, under a tab.
notsponge [240]
A menu bar organizes related commands together, under a tab.
So the answer is <span>b. menu bar</span>
8 0
4 years ago
Can i get some help please .
Alex787 [66]

Answer:

Interest

So, lets say that you took a loan from the bank of 20,000. But, when you are supposed to pay it back, you need to pay 25,000. This is because of interest. When the bank gives you the money, they cannot give it to you just like that. There is no profit coming from it. So, there is the thing called interest which basically says that since you took money from the bank, you need to pay a little more because you borrowed money from them.

4 0
3 years ago
Read 2 more answers
What is a multipurpose network device?
exis [7]

Answer:

A switch connects multiple devices to a network. ... devices are usually integrated into a multipurpose network device

7 0
3 years ago
Piers wants to take a course on XML. He is a certified web designer,but he has not used XML before. How can he use XML to improv
Agata [3.3K]

Answer:

It will bring more verstality in his website. He will be able to define tags.

Explanation:

XML allows to define your own tags. You can bring semantics into your website which make data browsing easier.

3 0
3 years ago
Your friend wants to know about Microsoft Expression Web 4.
Vlad [161]
Microsoft Expression Web 4 is 
--
Component of Expression Studio
--
Design and Develop Web Pages using HTML5, CC3, ASP.Net, and more
--
Requires .Net Framework & Silverlight 4.0
--
3 0
3 years ago
Other questions:
  • 3. If B3=6 and D5=8, what would the following function return? IF(B3&gt;D5, "Closed", D5-B3) *
    10·2 answers
  • You bought a monochrome laser printer two years ago. The printer has gradually stopped feeding paper. Which printer component sh
    14·1 answer
  • Gina is driving her car down the street. She has a teddy bear sitting on the back seat. A dog runs in front of Gina's car, so sh
    15·2 answers
  • Sales representatives want to capture custom feedback record details related to each Account. The sales reps want to accomplish
    12·1 answer
  • Robert's got a quick hand
    8·2 answers
  • Complete the sentence.
    5·1 answer
  • Teenagers and their parents will never understand each other-the generation gap is too big. Its for my grade 11 English speech​
    10·2 answers
  • What was the worlds first coding language
    15·2 answers
  • Aaaaaaaaaaaaaaaaplssssssssssssssssssssssssssssshelpppppppppppppppppppppppp
    11·2 answers
  • Which one did I buy the iPhone 13 or the Samsung S22 Ultra?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!