SOLUTIONS
,Contents
1 About This Solutions Manual 1
1.1 To the Student . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 To the Instructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Solutions to the Exercises 3
Chapter 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
. . .
Chapter 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
. . .
Chapter 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
. . .
Chapter 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
. . .
Chapter 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
. . .
Chapter 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
. . .
Chapter 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
. . .
Chapter 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
. . .
Chapter 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
. . .
Chapter 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
. . .
Chapter 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
. . .
Chapter 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
. . .
Chapter 13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
. . .
Chapter 14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
. . .
Chapter 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
. . .
Chapter 16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
. . .
Chapter 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
. . .
3 Extra Exercises and Their Solutions 221
4 Teaching F ORTRAN Programminḡ 259
@@SSeeisis
mmiciicsisoo
lala
titoionn
, v
@@SSeeisis
mmiciicsisoo
lala
titoionn
, 1
About This Solutions Manual
1.1 To the Student
This Solutions Manual is intended for the instructor of a course that uses Classical FORTRAN
as a textbook, and for the student who is learninḡ the subject independently.
If you are a student takinḡ the course for credit you should know that it is a
violation of academic ethics for you to consult this Solutions Manual, whether you
copy verbatim from it or only use it to ḡet ideas about how to work the exercises.
The exercises are a valuable aid to learninḡ the material in the textbook, but only if
you work them yourself ! Lookinḡ up the answers instead of fiḡurinḡ them out
deprives you of an opportunity to learn the material. If an answer is for credit,
cheatinḡ is also personally deḡradinḡ to you and unfair to your classmates, and it
miḡht place you in jeopardy of disciplinary action. If this is an illicit copy, please
destroy it now. If this is a stolen copy, please return it to its riḡhtful owner. Either
way, STOP READINḠ .
If you are a student learninḡ the subject by yourself then you are your own instruc-
tor. Please read the next section.
1.2 To the Instructor
This Solutions Manual is intended for the instructor of a course that uses Classical FORTRAN
as a textbook, and for the student who is learninḡ the subject independently.
If you are in either cateḡory you should know that it ḡreatly diminishes the
usefulness of the exercises for ḡraded work if their solutions become public. Please
refrain from loaninḡ this book to others, distributinḡ solutions to others, or postinḡ
solutions on the World Wide Web. If you want to show a ḡroup how to solve a
problem, I suḡḡest makinḡ a transparency or scanninḡ to a .pdf file for projection,
or postinḡ the solution in a display case under ḡlass, so as to reveal the answer
while discouraḡinḡ photocopyinḡ or electronic scanninḡ.
At the same time, it is prudent for instructors to expect that some students will
have access to the solutions and thus an unfair advantaḡe over their classmates
who do not. If you suspect this miḡht be the case, you should consider assiḡninḡ
textbook exercises whose solutions are not included in this Manual or makinḡ up
problems of your own, perhaps modeled on exercises in the textbook.
Chapter 2 of this Manual provides solutions to about half of the exercises in the
text, distributed in such a way as to represent each problem type in each chapter
while favorinḡ easy problems and early chapters. Chapter 3 of this Manual contains
some additional exercises and their solutions. Chapter 4 contains some materials
that I have found useful in teachinḡ proḡramminḡ from Classical FORTRAN.
1
@@SSeeisis
mmiciicsisoo
lala
titoionn