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
What is the meaning of the word joystick
Roman55 [17]
<span>The meaning of Joystick is the control column of an aircraft</span>
4 0
3 years ago
Read 2 more answers
when doing a complex presentation which of the fallowing will be the best tool to begin designing your presentation
qaws [65]

but where are the option bro

7 0
2 years ago
Read 2 more answers
PLEASEEEEE HELLPPP IT'S URGENT!!!
Usimov [2.4K]

Answer:

Battery: DC power source to feed electricity in the circuit

Processor: component that reads instructions from memory, executes them and writes result data to memory and output devices

Accelerometer: device that measures motion acceleration along 3 dimenstions

Micro USB Port: standard interface for serial communication and power

Compass: sensor that finds orientation based on earth's magnetic field

•Block Editor: pass

Iteration: one cycle of a program loop

•Selection: pass

Variable: program construct to hold a value that code can read and write to.

Algorithm: programming code with a particular function to transform a given input to an output

Debug: the process of finding and fixing mistakes in your program

4 0
3 years ago
3. with a dui charge on a driver’s record ______________. a. the price of his or her insurance greatly increases b. he or she ma
djyliett [7]
<span>The answer to your question is D. both A and C</span>
7 0
4 years ago
Complete the steps to evaluate the following
kirill115 [55]

Answer:

log base 3a= -0.631.log a/3 base 3

Now, -log m= log 1/m

hence,

log base 3a= 0.631.log 3/a base 3

log base 3a/log 3/a base 3 =0.631

log base 3 ( a.3/a) =.631 since, log m/logn =log n(m)

log base 3 3=0.631

Hence, answer is log base 3 3=0.631

Explanation:

Please check the answer section.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Approximately what percent of U.S. businesses have some form of remote work program? (from Chapter 1)
    14·1 answer
  • What is the danger in judging someone according to his or her social networking profile
    12·1 answer
  • a certain battery can supply 6 J of energy to every coulomb of charge moving through a circuit. if the circuit consists of two i
    13·1 answer
  • Assume that isIsosceles is a bool variable, and that the variables isoCount, triangleCount, and polygonCount have all been decla
    7·1 answer
  • What are the details of frame transmission andreception that LAN interface handles?
    7·1 answer
  • String member function compare compares two strings (or substrings) and returns 0 if:
    5·1 answer
  • You are network administrator for an Active Directory forest with a single domain. Then network has three sites with one domain
    12·1 answer
  • Please help I don’t know
    5·1 answer
  • How to get the whole number of a fraction in python
    6·1 answer
  • How do IT Support professionals measure success? Choose all answers that apply. You will get credit for all answers that are cor
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!