1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Help with fortran

  1. Feb 20, 2006 #1
    help with fortran plz

    i'm new with programming and i have a problem with a homework i've been assigned from university. it's quite a simple programm but i'm stuck and going crazy:surprised . can anyone plz help. there seems to be a problem with the random function. but i couldn't fix it. i'm using silverfrost ftn95 plato3 ide compiler. the scope of this programm is to calculate the mean value of a sum of random numbers and as a seed is used a default number. i have attached to this post a pic of what the problem appears to be. take a look plz and help me if you can. going crazy

    Attached Files:

  2. jcsd
  3. Feb 20, 2006 #2

    * Learn to use comment cards (yes I am that old ;), while it may seem pointless with simple programs it will be of great value in the future (in particular to those looking at your code).
    * What happens if the user inputs 5 for N ? You need some error trapping, (i.e. you need to tell them they goofed since N must be between 10 and 100000 and re-request the value of N).
    * Is there really a need for a vector (M) and 2 do loops in this program ?
    * Since you have declared "Implicit none" how does the compiler to know
    (i.e. how do you tell it) that random is a REAL function ?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook