FORTRAN PROGRAM FOR MEANS (Beginner)

Click For Summary

Discussion Overview

The discussion revolves around a beginner's challenge in writing a Fortran program to compute various means (arithmetic mean, root-mean-square average, geometric mean, and harmonic mean) for a set of numbers. The scope includes programming techniques and troubleshooting in Fortran.

Discussion Character

  • Homework-related
  • Technical explanation

Main Points Raised

  • One participant expresses difficulty in extending their Fortran code from calculating means for three numbers to a larger set of numbers.
  • The same participant requests assistance in writing a program that can compute multiple types of means for specified sets of numbers.
  • Another participant asks for the code that has been attempted so far to better understand the issue.
  • A different participant questions whether this programming task is related to a previously discussed thread.
  • One participant suggests that the original poster may already have implemented the formulas but is struggling with the arithmetic operations involved.

Areas of Agreement / Disagreement

The discussion does not show clear consensus, as participants are seeking clarification and additional information rather than agreeing on a solution.

Contextual Notes

There are limitations in the original poster's description, as it does not include any code snippets or specific errors encountered, which may affect the ability to provide targeted assistance.

Who May Find This Useful

Beginners in Fortran programming, individuals interested in statistical computations, and those seeking help with programming challenges related to means.

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.
 
Technology news on Phys.org
Can you post what you have done so far?
 
You've already programmed the formulas. Are you having trouble doing the arithmetic?
 

Similar threads

  • · Replies 37 ·
2
Replies
37
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
4
Views
5K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 34 ·
2
Replies
34
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 27 ·
Replies
27
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K