subject
Engineering, 19.02.2020 19:38 rbalexander25

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: 3

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, lerasteidl
Determine whether or not it is possible to compress air adiabatically from k to 140 kpa and 400 k. what is the entropy change during this process?
Answers: 3
image
Engineering, 04.07.2019 18:10, namira16
Which of the following controllers anticipates the future from the slope of errors over time? a)-proportional b)-on/off c)-integral d)-derivative.
Answers: 2
image
Engineering, 04.07.2019 18:20, safiyabrowne7594
Ahe-xe mixture containing a 0.75 mole fraction of helium is used for cooling electronics in an avionics application. at a temperature of 300 k and atmospheric pressure, calculate the mass fraction of helium and the mass density, molar concentration and molecular weight of the mixture. if the cooling capacity is 10 l, what is the mass of the coolant?
Answers: 3
image
Engineering, 04.07.2019 19:20, mercedesamatap21hx0
To design a steam turbine to produce 12,000 hp power. a engineer comsiders using a steady state stean low st 1160fr and engineer considers using a steady state steam flow at 1160°r and 450 psia to drive this steam turbine. the exhaust of the steam is cooled by the lake (vacuum). heat losing to the surroundings is measured at a rate of 555.55 btu/s. (a) sketch the system with the given conditions. (b) neglecting kinetic and potential energy changes from inlet to exit, determine the volumetric flow rate of the steam at the inlet, (ft'/hr). must clearly show unit conversions at crtical terms.
Answers: 1
You know the right answer?
Use the algorithm below to answer the four questions:

ALGORITHM Mystery(n)

/...

Questions in other subjects:

Konu
Chemistry, 06.07.2019 11:00
Konu
Mathematics, 06.07.2019 11:00