|
Prev: an Invitation to be Involved in a Survey on Developing Scientific Computing Software
Next: FITS Library Package upgrade
From: rajkrai on 20 Jan 2008 17:26 Hi, Could you please give me some hints to find the average of the following value of 1.1, 2.2, 3.3 and 4.4 only, seperated with 3 others values, using Do Loop in Fortran 90: 1.1 2.0 3.0 4.0 2.2 2.2 2.0 3.0 4.0 3.3 3.3 2.0 3.0 4.0 4.4 4.4 2.0 3.0 So that I can get (1.1+2.2+2.2+3.3+3.3+4.4+4.4)/7= 2.985. I would like to appreciate your help. -Raj
From: Tim Prince on 20 Jan 2008 18:16
rajkrai(a)gmail.com wrote: > Hi, > > Could you please give me some hints to find the average of the > following value of 1.1, 2.2, 3.3 and 4.4 only, seperated with 3 > others values, using Do Loop in Fortran 90: > > 1.1 > 2.0 > 3.0 > 4.0 > 2.2 > 2.2 > 2.0 > 3.0 > 4.0 > 3.3 > 3.3 > 2.0 > 3.0 > 4.0 > 4.4 > 4.4 > 2.0 > 3.0 > > So that I can get (1.1+2.2+2.2+3.3+3.3+4.4+4.4)/7= 2.985. I would like > to appreciate your help. > > -Raj This looks like homework to motivate you to use mod, and sum and count intrinsic functions with mask. Do you get credit only for doing it with Fortran 66? Didn't you read about the usual conditions for help on homework? |