Expressions
Category: Expressions
Author: Brett Wortzman
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"). If the expression is illegal, then write "error".
1) 10 - 3 * 3 + (4 - 2) - 1
2) 10.0 / 4 + 15 / 7 + 1.5
3) 5 + 2 + "3" + (2 - 1)
4) 5 < 22 < 17
5) 3 < 7 || !(5 > 3 && 2 != 2)