Review Exercise 1
Question 1
1. When \(a=645\) and \(b=255\), \(c=2.53\) to 2dp.
\(d=2\)
\(e=db=510\)
\(f=a-e=135\)
\(a=255\)
\(b=135\)
\(c=1.89\)
\(d=1\)
\(e=db=135\)
\(f=a-e=120\)
\(a=135\)
\(b=120\)
\(c=1.13\)
\(d=1\)
\(e=db=120\)
\(f=a-e=15\)
\(a=b=120\)
\(b=15\)
\(c=8\)
\(d=8\)
\(e=db=120\)
\(f=a-e=0\)
\(f=0\) therefore answer is \(15\).
STOP
2. Since \(a\) is less than \(b\), \(d\) would be equal to 0 and \(b\) would be set to \(a\) and \(a\) would be set to \(b\).
This would result in the numbers being swapped and the pattern in the previous question happening.
3. This flow chart finds the highest common factor of two numbers.
Question 2
- Lower bound of 4, because all lengths added up = 390cm.
- 80 in the first bin, 65 in the second bin, 75 in the third bin, 55 in the fourth bin, 60 in the fifth bin, 55 in the sixth bin.
- 100 in the first bin, 100 in the second bin, 80 in the third bin, 55 in the fourth bin, 55 in the fifth bin.
- First two bins are maxed out, and no combination of the last 5 planks can do better than 5 bins.
Question 3
55, 80, 25, 84, 25, 34, 17, 75, 3, 5