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 * 4 + 5 * 6
2) 23 % 5 + - 17 % (16 % 10)
3) "1" + 2 + 3 * 4 + (5 + 6)
4) 1.5 * 2 + 20 / 3 / 4.0 + 6 / 4
5) 345 / 10 / 3 + 10 / (5 / 2.0)