c c c
SOLUTIONS
,Contents
1 About This Solutions Manual
c c c 1
1.1 To the Student . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c
1.2 To the Instructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c
2 Solutions to the Exercises
c c c 3
Chapter 1 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . .
c c c c c c c c c c c c c 5
. c c . c . c . c .
Chapter 2 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . .
c c c c c c c c c c c c c 9
. c c . c . c . c .
Chapter 3 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . .
c c c c c c c c c c c c c 17
. c c . c . c . c .
Chapter 4 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . .
c c c c c c c c c c c c c 33
. c c . c . c . c .
Chapter 5 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . .
c c c c c c c c c c c c c 75
. c c . c . c . c .
Chapter 6 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . .
c c c c c c c c c c c c c 95
. c c . c . c . c .
Chapter 7 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . . 115
c c c c c c c c c c c c c
. c c . c . c . c .
Chapter 8 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . . 121
c c c c c c c c c c c c c
. c c . c . c . c .
Chapter 9 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . . 129
c c c c c c c c c c c c c
. c c . c . c . c .
Chapter 10 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . . 139
c c c c c c c c c c c c c
. c c . c . c . c .
Chapter 11 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . . 159
c c c c c c c c c c c c c
. c c . c . c . c .
Chapter 12 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . . 171
c c c c c c c c c c c c c
. c c . c . c . c .
Chapter 13 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . . 179
c c c c c c c c c c c c c
. c c . c . c . c .
Chapter 14 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . . 189
c c c c c c c c c c c c c
. c c . c . c . c .
Chapter 15 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . . 195
c c c c c c c c c c c c c
. c c . c . c . c .
Chapter 16 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . . 201
c c c c c c c c c c c c c
. c c . c . c . c .
Chapter 17 . . . . . . . . . . . . . . . .
c c c c c c c c c c c c c c c c c . c. c . c. c . . . . . . . . . . . . . . 207
c c c c c c c c c c c c c
. c c . c . c . c .
3 Extra Exercises and Their Solutions
c c c c 221
4 Teaching FORTRAN Programming
c c 259
@@SSee
isis
mmiciicsis
oolala
titoionn
, v
@@SSee
isis
mmiciicsis
oolala
titoionn
, 1
About This Solutions Manual c c c
1.1 To the Student c c
This Solutions Manual is intended for the instructor of a course that uses Classical FORTRAN
c c c c c c c c c c c c c c
as a textbook, and for the student who is learning the subject independently.
c c c c c c c c c c c c
If you are a student taking the course for credit you should know that it is a violation of
c c c c c c c c c c c c c c c c c c
academic ethics for you to consult this Solutions Manual, whether you copy verbatim from it or
c c c c c c c c c c c c c c c c
only use it to get ideas about how to work the exercises. The exercises are a valuable aid to
c c c c c c c c c c c c c c c c c c c
learning the material in the textbook, but only if you work them yourself ! Looking up the
c c c c c c c c c c c c c c c c c
answers instead of figuring them out deprives you of an opportunity to learn the material. If an
c c c c c c c c c c c c c c c c c
answer is for credit, cheating is also personally degrading to you and unfair to your
c c c c c c c c c c c c c c c
cclassmates, and it might place you in jeopardy of disciplinary action. If this is an illicit c c c c c c c c c c c c c c c
copy, please destroy it now. If this is a stolen copy, please return it to its rightful owner. Either
c c c c c c c c c c c c c c c c c c c
way, STOP READING.
c c c
If you are a student learning the subject by yourself then you are your own instruc-
c c c c c c c c c c c c c c c
tor. Please read the next section.
c c c c c
1.2 To the Instructor c c
This Solutions Manual is intended for the instructor of a course that uses Classical FORTRAN
c c c c c c c c c c c c c c
as a textbook, and for the student who is learning the subject independently.
c c c c c c c c c c c c
If you are in either category you should know that it greatly diminishes the usefulness of the
c c c c c c c c c c c c c c c c
exercises for graded work if their solutions become public. Please refrain from loaning this
c c c c c c c c c c c c c c
book to others, distributing solutions to others, or posting solutions on the World Wide Web. If
c c c c c c c c c c c c c c c c
you want to show a group how to solve a problem, I suggest making a transparency or scanning
c c c c c c c c c c c c c c c c c c
cto a .pdf file for projection, or posting the solution in a display case under glass, so as to
c c c c c c c c c c c c c c c c c c
reveal the answer while discouraging photocopying or electronic scanning.
c c c c c c c c c
At the same time, it is prudent for instructors to expect that some students will have access to
c c c c c c c c c c c c c c c c c
the solutions and thus an unfair advantage over their classmates who do not. If you suspect
c c c c c c c c c c c c c c c c
this might be the case, you should consider assigning textbook exercises whose solutions are
c c c c c c c c c c c c c c
not included in this Manual or making up problems of your own, perhaps modeled on exercises
c c c c c c c c c c c c c c c c
in the textbook.
c c c
Chapter 2 of this Manual provides solutions to about half of the exercises in the text,
c c c c c c c c c c c c c c c
distributed in such a way as to represent each problem type in each chapter while favoring easy
c c c c c c c c c c c c c c c c c
problems and early chapters. Chapter 3 of this Manual contains some additional exercises
c c c c c c c c c c c c c
and their solutions. Chapter 4 contains some materials that I have found useful in
c c c c c c c c c c c c c c
cteaching programming from Classical FORTRAN. c c c c
1
@@SSee
isis
mmiciicsis
oolala
titoionn