CS251: Programming Languages
Homework 1
Due Thursday, February 4
This homework covers Chapters 1 and 2 of the text: Pseudocodes and
FORTRAN.
Do problems 1, 2, 3, 4, 5, 6, 8, 10 listed below. The remaining
two problems (7 and 9) count as extra credit.
- MacLennan 1.8 (p.11)
- MacLennan 1.11 (p.11) Note that there are actually many
correct answers to this question.
- MacLennan 1.20 (p.15)
- MacLennan 1.43 (p.27)
- MacLennan 2.3 (p.43) Consult the FORTRAN syntax (in the
handout) to write it correctly. It may help to write it first in
Java and then "translate it" to FORTRAN.
- MacLennan 2.6 (p.45)
- MacLennan 2.25 (p.75) To check your answer, the correct
calculations lead to dm and c.
- MacLennan 2.31 (p.87)
- MacLennan 2.35 (p.91) To understand it better, consider
writing a program that can read a character at a time from the
input and outputs yes or no depending on whether it read a DO
statement.
- What are the principles mentioned in Chapters 1 and 2?