Assignment 1 for Finance 599.
When turning in these assignments, please email me a copy of the program and include in
the email text the sample output that you have cut and pasted from your screen.
1. Type in, compile, and run a fortran program that does the following:
- sums the integers from 1 to 100
- takes the resulting number and divides it by 3.2
- writes the answer to your screen in such a way that the screen reads "The sum of i
from 1 to 100 is ...., and when you divide it by 3.2, the answer is ..."
(without the quotes)
2. Type in, compile, and run a fortran program that does the following
- reads the data file "/u08/prdaves/public/assign1.ascii" This file has
some numbers--one number per line.
- calculate the mean and standard deviation of this series of numbers (Hint, the square
root function in fortran is sqrt(..) and you use a read statement that looks like
read(10,*,end=900) where line 900 is what you do when you get to the end of the file you
are reading.)
- write out your answer to the screen in such a way that the screen reads "The mean
of the sample is ... and the standard deviation is ..."
3. Type in, compile, and run a fortran program that does the following (you can
modify the program from 1 to do this)
- takes the numbers from 1 to 100 and
- divides each one by 3.2
- writes the number and the quotient to a file called "sample.out"
The output should look like this: (the integer starts in column 1, the quotient
in column 10. The quotient should have 4 decimal places.
1 0.3125
2 0.6250
..... etc.