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 18:10
Carbon dioxide gas expands isotherm a turbine from 1 mpa, 500 k at 200 kpa. assuming the ideal gas model and neglecting the kinetic and potential energies, determine the change in entropy, heat transfer and work for each kilogram of co2.
Answers: 2
question
Engineering, 04.07.2019 18:20
Describe one experiment in which the glass transition temperature and melting temperature of a totally amorphous thermoplastic material can be determined. show the relevant experimental results in a diagram which should be properly annotated with the two temperatures clearly marked. what is likely to happen to the curve in the diagram if the amorphous polymer is replaced by a thermosetting type?
Answers: 2
question
Engineering, 04.07.2019 19:10
Aplate of dimensions 3 m x 3 m is placed 0.37 mm apart from a fixed plate. the plate requires a force of 2n to move at speed of 45 cm/s. evaluate the viscosity of the fluid in between the plates
Answers: 3
question
Engineering, 04.07.2019 19:10
Ahelical coil spring has a mean diameter of 50 mm, a wire diameter of 5.5 mm and is wound with a pitch of 10 mm. the spring steel has an ultimate strength of 1250 mpa. find the force needed to compress the spring solid and the wire stress in this condition. state whether the spring will return to its initial length.
Answers: 1
You know the right answer?
Use the algorithm below to answer the four questions:
algorithm mystery(n)
//input: a...
Questions
question
Mathematics, 09.10.2021 08:00
question
Mathematics, 09.10.2021 08:00
Questions on the website: 13722359