FORTRAN PROGRAM FOR MEANS (Beginner)

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 3K views
rk2ray
Messages
7
Reaction score
0
I am learning Fortran and I am able to write code for 3 number means. Now For computing it for set of numbers is not getting in my mind. I am not able to do it.

Writing a single Fortran program that calculates the arithmetic mean, rms (root-mean-square) average, geometric mean, and harmonic mean for a set of numbers. Running the code for the following four sets of numbers.
(a) 4, 4, 4, 4, 4, 4, 4
(b) 4, 3, 4, 5, 4, 3, 5
(c) 4, 1, 4, 7, 4, 1, 7
(d) 1, 2, 3, 4, 5, 6, 7

Thanks for the help.
 
Physics news on Phys.org