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