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) 2 + 3 * (2 + 3) + 17/4
2) 67 % 10 % 5 * 6 - 3 % 6
3) 7.5 * 2 + 19/2/2.0 - 0.5 - 1/2
4) 4 + 2 * 2 + "2 * 2" + 2 * 2 + 4
5) 43/4/3 * 5.0/2 + 5/2