| Reading: | Weiss, Chapter 1 |
| Weiss, Chapter 2, Sections 2.1, 2.2, 2.4.1 | |
| Weiss, Chapter 3, Sections 3.1 - 3.4 |
| 1. |
Weiss, Exercise 1.19
Write a program to determine all pairs of positive integers, (a,b), such that a < b < 1000 and (a2+b2+1)/(ab) is an integer. |
| 2. |
Weiss, Exercise 1.22
In the following arithmetic puzzle, each of the ten different letters are assigned a different digit.
MARK
+ALLEN
-----
WEISS
Write a program that finds all possible solutions. One such solution is shown below:
MARK A=1 W=2 N=3 R=4 E=5 9147
+ALLEN L=6 K=7 I=8 M=9 S=0 +16653
----- -----
WEISS 25800
|
| 3. |
Adapted from Weiss, Exercise 3.10
A combination lock has the following basic properties:
Imagine designing a class to represent a combination lock.
|