1 /* 2 * A program to explore the construction of arithmetic expressions 3 * in the context of problem solving. 4 */ 5 6 7 package expressions; 8 9 10 public class ExpressionsThing { 11 12 13 public static void main(String[] args) { 14 double one = 3.14 * 5 + 5; 15 System.out.println("one = " + one); 16 double two = 3.14 * (5 + 5); 17 System.out.println("two = " + two); 18 double three = (3.14 * (5 + 5)); 19 System.out.println("three = " + three); 20 int four = (2 * 3); 21 System.out.println("four = " + four); 22 double five = (45.0 / 2.0); 23 System.out.println("five = " + five); 24 double six = (65.0 / (1.0 / 3.0)); 25 System.out.println("six = " + six); 26 double seven = ((55.0 / (1.0 / 2.0)) + (65.0 / (1.0 / 3.0))); 27 System.out.println("seven = " + seven); 28 double eight = (3.14 * (11.3 * 11.3)); 29 System.out.println("eight = " + eight); 30 double nine = (27.7 * 27.7); 31 System.out.println("nine = " + nine); 32 double ten = ((eight + nine) / 2); 33 System.out.println("ten = " + ten); 34 double eleven = (243.5 * .17); 35 System.out.println("eleven = " + eleven); 36 int twelve = (3 / 3); 37 System.out.println("twelve = " + twelve); 38 int thirteen = (7 - (4 + 2)); 39 System.out.println("thirteen = " + thirteen); 40 int fourteen = ((9 + 3) - (7 + 1)); 41 System.out.println("fourteen = " + fourteen); 42 int fifteen = (((6 + (2 + 2)) * 4) / 8); 43 System.out.println("fifteen = " + fifteen); 44 45 46 } 47 48 }