Next: Add a new capability
Up: Assignment 8: Process Objects
Previous: Robustness
- 1.
- A few homeworks ago, we wrote a recursive program that
raises a double x to an integral power n, by
dividing n by two repeatedly. For this assignment, we
want a version of that program that works with two integers.
Just to make things interesting, you should make this version
iterative.
- 2.
- Use your solution to the previous problem to add a new
operator,
,
to your calculator. It should raise the first
operand to the power specified by the second operand.
Allen B. Downey
1999-10-28