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
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 flow rate of air through a through a pipe is 0.02 m5/s. a pitot static tube is placed in the flow. the radius of the pitot static tube is 1 mm. assuming the flow to be steady and the air to be at 300k, calculate the difference in total and static pressure if the diameter of the pipe is: (a) d 0.1 m d 0.05 m (c) d 0.01 m
Answers: 2
question
Engineering, 04.07.2019 18:20
Have a greater impact on maintenance productivity than any other support group. (clo5) a)-the top management b)-inventory and purchasing c)-sub-contracting d)-cmms
Answers: 2
question
Engineering, 04.07.2019 18:20
Determine the damped natural frequencies and the steady state response of a decoupled damped forced two degrees of freedom system. 10ä1 + 2q1 20q1 10 cos t; 10q2 +4q2 + 40q2 10 cos t
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
Mathematics, 24.06.2019 21:30
question
Mathematics, 24.06.2019 21:30
question
Chemistry, 24.06.2019 21:30
Questions on the website: 13722363