CS 36 FORTRAN Programming
Week 6
Homework
Read all of chapter 6 - Programming with Functions
Look at the following problems:
1) p379n13
2) p381n19
Try to write the algorithms -- draw a picture, identify the inputs
and outputs, look for places where you need to do selection or repetition.
The completed algorithm is a clear set of steps that will solve the problem.
You need to design the algorithm before you can implement the algorithm
(by writing the code).
Test 2 Information
-
April 6th
-
covers: chapters 4 and 5 (mostly chapter 4)
-
last 30 minutes of class before the break
-
write a small program - DO loop or DO WHILE loop; do some basic formatted
output
-
study handout on "Program Requirements"
-
Study the solutions to assignment 3
-
to improve your understanding of loops
-
as examples that follow the "Program Requirements"
-
Particularly study how indentation is done -- many students seem to forget
about this.
Solutions to Assignment 3
1) p246n14 - smallestLargest
source
code source
code with sample run
2) p246n17 - statistics source
code source
code with sample run
3)
p246n12 - Fibonacci source
code source
code with sample run