


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Lab; Class: FORTRAN PROGRAMMING; Subject: Computer Science; University: Colorado School of Mines; Term: Spring 2008;
Typology: Lab Reports
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Due : 11:59 PM., Wednesday, March 25, 2008 Objective : Familiarize yourself with FORTRAN SUBROUTINES and FUNCTIONS.
Here is an example of the program running:
This is a betting game called Lucky - 7, you start with $ Dice are rolled and you can bet on different dice values 1 - 6 pays out 1: 7 pays out 3: 8 - 12 pays out 1:
What range of dice values do you wish to bet on?
1
How much do you wish to bet?? 50
Dice 1 's value is 2 Dice 2 's value is 6
The total amount is 8
You Lose. $ 50 :( You have $ 50 to work with Would you like to continue the game?? (y/n) y
What range of dice values do you wish to bet on?
2
How much do you wish to bet?? 50
Dice 1 's value is 1 Dice 2 's value is 1
The total amount is 2
You Lose. $ 50 :( You have $ 0 to work with Would you like to continue the game?? (y/n) y
What range of dice values do you wish to bet on?
Cat your second program source code. (to provide a listing of your code) cat mylesson2.f Compile your program again. (to verify no compilation error) g95 mylesson2.f Run your program. Show the results for 0 to 5 cars lambda = 1.6 (run six times). a.out