Chapter 1 Review Exercise Solutions
R1.1
Programs are sequences of instructions and decisions that a computer carries out to
achieve a task. Programming means designing and implementing the instructions, as
opposed to using their results.
R1.2
A household

Chapter 6 Review Exercise Solutions
R6.1
Java supports while, for, and do loops. while loops are used when the loop must
continue until a certain condition is met; for loops are used when a variable runs from a
starting to an ending value with a constant

Chapter 5 Review Exercise Solutions
R5.1
- if quarters > 0 then System.out.println(quarters + " quarters");
Missing parentheses (quarters > 0 ) and illegal keyword then
- if (1 + x > Math.pow(x, Math.sqrt(2) y = y + x;
Unbalanced parentheses around condit

#include <iostream>
void print_divisibility(int value, int divisor) cfw_
bool evenly_divisible = value % divisor = 0;
std:cout < value ;
if (evenly_divisible)
std:cout < " is evenly divisible by ";
else
std:cout < " is not evenly divisible by ";
std:cout