1 /* 2 This program explores and uses the construction of arithmetic expressions 3 */ 4 package Expressions; 5 6 7 8 public class ExpressionsThing { 9 10 public static void main(String[] args) { 11 12 double one = 3.14 * 5 + 5; 13 System.out.println("one = " + one); 14 double two = 3.14 * (5 + 5); 15 System.out.println("two = " + two); 16 double three = (3.14 * (5 + 5)); 17 System.out.println("three = " + three); 18 19 int four = (5 * 6); 20 System.out.println("four = " + four); 21 double five = (55.0 /2); 22 System.out.println("five = " + five); 23 double six = (65.0 / 3.0); 24 System.out.println("six = " + six); 25 double seven = ((55.0 / 2.0) + (65.0 / 3.0)); 26 System.out.println("seven = " + seven); 27 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 = (((3.14 * (11.3 * 11.3)) + (27.7 * 27.7)) / 2.0); 33 System.out.println("ten = " + ten); 34 double eleven = (243.5 * 0.17); 35 System.out.println("eleven = " + eleven); 36 37 int twelve = (3 / 3); 38 System.out.println("twelve = " + twelve); 39 int thirteen = ((7 - 4) - 2); 40 System.out.println("thirteen = " + thirteen); 41 int fourteen = (((9 - 7) + 3) - 1 ); 42 System.out.println("fourteen = " + fourteen); 43 int fifteen = (((8 - 4) - 2) + (6 / 2)); 44 System.out.println("fifteen = " + fifteen); 45 46 47 } 48 } 49