subject
Engineering, 28.01.2020 18:41 kailinaguilar9455

Use the algorithm below to answer the four questions:
algorithm mystery(n)
//input: a nonnegative integer n
s ← 0
for i ← 1 to n do
s ← s + i * i
return s
a.) what does this algorithm compute?
b. ) what is its basic operation?
c.) how many times is the basic operation executed? (solve the summation.)
d.) what is the efficiency of this algorithm?

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 16:10
An electrical motor raises a 50kg load at a construct velencity .calculate the power of the motor, if it takes 40sec to raise the load through a height of 24m(take g =9.8n/g)
Answers: 2
question
Engineering, 04.07.2019 18:10
Acompressor receives the shaft work to decrease the pressure of the fluid. a)- true b)- false
Answers: 3
question
Engineering, 04.07.2019 18:10
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
question
Engineering, 04.07.2019 18:10
The drive force for diffusion is 7 fick's first law can be used to solve the non-steady state diffusion. a)-true b)-false
Answers: 1
You know the right answer?
Use the algorithm below to answer the four questions:
algorithm mystery(n)
//input: a...
Questions
question
Mathematics, 29.10.2020 17:10
Questions on the website: 13722361