CPS 201
HW 2
Due: Sep. 6
1) Reading: Read Chapter 1 of the text.
2) (4 pts) Below is a list of important gures in the history of scientic computing. Look them up online
and briey describe their contri
MODULE const
INTEGER, PARAMETER : dp = KIND(1.0d0), sp = KIND(1.0e0)
REAL(KIND=dp), PARAMETER : DPI = 3.141592653589793d0
END MODULE const
PROGRAM ssn
USE const
IMPLICIT NONE
! This is a program that
CPS 201
1
HW 7
Due: Oct 11
Lab Portion
This section is worth 5 points.
1) Write a program that will compute the sums below for a user-input value of n. You should write one
program that evaluates all
CPS 201
Midterm Project
Due: Nov. 1
You may not discuss this assignment with anyone but me. You must email me a copy of your program and answers
to the questions posed prior to 5:00pm on the due date.
CPS 201
1
HW 8
Due: Oct 21
Lab Portion
1) (1 pt) Run the maximum height program (with no modicataions) on the course website using input
redirection to get heights from the heights_test.in le. What is
CPS 201
HW 6
Due: Oct 4
For this assignment, you will need to use some intrinsic fortran functions that have not been used yet (see
list on the course website for the ones that you might need).
1
Lab
CPS 201
HW 4
Due: Sep. 20
This homework has 2 portions. The rst consists of some short programs that you should be able to
(mostly) complete during the lab session.
Remember to follow all the rules of
CPS 201
HW 3
Due: Sep. 13
1) (2 pts) Write a Fortran90 program that will ask the user to input the radius of a circle and output the
area of the circle. Test your program with the value radius = 3.2.
CPS 201
HW 5
Due: Sep. 27
1) (2 pts) Explain what is wrong with the short code segment below.
INTEGER : i
i=2
DO
i = 2*i
IF(i = 3)
EXIT
ENDIF
WRITE(*,*) i = ,i
ENDDO
2) (4 pts) Trace the program below
CPS 201
HW 1
Due: Aug. 30
1) (6 pt) Consider the list of numbers below:
1.736
29.99
0.002531
104.3
0.4929
0.01974
a) What is the exact sum of these numbers?
b) Add the numbers from largest to smallest
Notes on HW3
Problem 1:
Ok
Problem 2:
The easiest way to enter the formula is to do
volume = DPI*radius*2*height/3
A common error is to do
volume = (1/3)*DPI*radius*2*height
This will result in 0 sinc
MODULE const
INTEGER, PARAMETER : dp = KIND(1.0d0), sp = KIND(1.0e0)
REAL(KIND=dp), PARAMETER : DPI = 3.141592653589793d0
END MODULE const
PROGRAM ssn
USE const
IMPLICIT NONE
! This is a program that