Expressions
Category: Expressions
Author: Stuart Reges
Book Chapter: 2.1
Problem: Expressions
For each expression in the left-hand column, indicate its value in the right-hand column. Be sure to list a constant of appropriate type (e.g., 7.0 rather than 7 for a double, Strings in quotes).
1) 3 * (5 - 2) - 3 - 2 * 2
2) 4 * 7 % 8 + 132 % 10 + 3 % 4
3) 27 / 5 / 2 + 3.4 * 2 - 1.1 * 2
4) 9 + 9 + "9 + 9" + 9 + 9
5) 19 / 2 / 2.0 + 2.5 * 6 / 2 + 0.5 * 4