subject
Engineering, 18.10.2019 19:30 kimlyn58p0wyn0

Write two versions of a program that reads a sequence of positive integers from the user, calculates their geometric mean, and print the geometric mean. note: in mathematics, geometric mean of a dataset a, a2, a..an is given by: wai a2 a3 "an for example, the geometric mean of 2, 9 and 12 is equal to 6 (v2-9-12-6). your two versions of the program should read the integer sequence in two ways: a) first read the length of the sequence for example, an execution would look like: enter the length of the sequence: 3 enter your sequence: 1 the geometric mean is: 1.8171 b) keep reading the numbers until 'done' is entered. for example, an execution would look like: enter a non-empty sequence of positive integers, each one in a separate line. end your sequence by typing done: 1 done the geometric mean is: 1.8171

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:10
The temperature of air decreases as it is compressed by an adiabatic compressor. a)- true b)- false
Answers: 2
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
question
Engineering, 04.07.2019 18:10
Compute the pressure drop of 30°c air flowing with a mean velocity of 8 m/s in a circular sheet-metal duct 300 mm in diameter and 15 m long. use a friction factor, f 0.02, and pair = 1.1644 kg/m a. 37.26 pa b. 25.27 pa n c. 29.34 pa d. 30.52 pa
Answers: 1
question
Engineering, 04.07.2019 18:20
Amixture of slurry and mud is to be pumped through a horizontal pipe of diameter 500 mm. the fluid behaves as a bingham plastic with a yield stress of 30 pa and viscosity 0.04 pa.s. describe the effects of the shear stress through a transverse section of the pipe by plotting the variation in shear stress and velocity profile: (i) just before the slurry starts to move (ii) as the slurry flows when the pressure gradient is double that in part (i)
Answers: 3
You know the right answer?
Write two versions of a program that reads a sequence of positive integers from the user, calculates...
Questions
question
Chemistry, 14.07.2021 20:10
question
Chemistry, 14.07.2021 20:10
question
English, 14.07.2021 20:20
question
English, 14.07.2021 20:20
question
Mathematics, 14.07.2021 20:20
Questions on the website: 13722359