Name: Anonymous 2009-02-18 0:43
Anyone here know FORTRAN well enough to help me out? I've got a project to do, and I have the general idea, but not a clue how to accomplish the important parts. How typical of me.
The problem in question has to do with counting, specifically, having 4 variables (height of obstacle, distance an animal can travel up the object in a day, distance the animal will slide down the object overnight, and the fatigue % that the animal will accumulate) and figuring out how many days it will take for this animal to reach the top, or how many days it will take for it to obtain a negative value, thus ending the program.
I'm figuring it out, slowly... but not quite fast enough.
I figure it will use a big DO statement to calculate distance up - distance down, then add in the % fatigue to end up with the real distance traveled that day, and that the DO loop will end once it reaches the number stated as the original height of the structure
Only problem is... nothing is coming to mind on how I go about accomplishing this DO loop. The program is also supposed to re-run itself, indefinitely I believe, but I haven't a clue how to do this either.
TL;DR Once I have my variables all set up, what shall my loop look like to calculate how many units(days) it would take for an animal to move up an object if it moves up x units, falls y units during the night, and due to fatigue can only travel x-(x*z) where z would be the unit of fatigue... and then how to I repeat the user input so the program can be reran indefinitely?
The problem in question has to do with counting, specifically, having 4 variables (height of obstacle, distance an animal can travel up the object in a day, distance the animal will slide down the object overnight, and the fatigue % that the animal will accumulate) and figuring out how many days it will take for this animal to reach the top, or how many days it will take for it to obtain a negative value, thus ending the program.
I'm figuring it out, slowly... but not quite fast enough.
I figure it will use a big DO statement to calculate distance up - distance down, then add in the % fatigue to end up with the real distance traveled that day, and that the DO loop will end once it reaches the number stated as the original height of the structure
Only problem is... nothing is coming to mind on how I go about accomplishing this DO loop. The program is also supposed to re-run itself, indefinitely I believe, but I haven't a clue how to do this either.
TL;DR Once I have my variables all set up, what shall my loop look like to calculate how many units(days) it would take for an animal to move up an object if it moves up x units, falls y units during the night, and due to fatigue can only travel x-(x*z) where z would be the unit of fatigue... and then how to I repeat the user input so the program can be reran indefinitely?