1 /* 2 * For the exploration of arithmetic expressions 3 */ 4 5 6 package expressions; 7 8 public class ExpressionsThing { 9 public static void main(String[] args){ 10 // Task 3 Expressions 11 double one = 3.14 * 5 + 5; 12 System.out.println("one = " + one); 13 double two = 3.14 * (5 + 5); 14 System.out.println("two = " + two); 15 double three = (3.14 * (5 + 5)); 16 System.out.println("three = " + three); 17 18 // Task 4 19 int four = (5 * 6); 20 System.out.println("four = " + four); 21 22 double five = (45.0/2); 23 System.out.println("five = " + five); 24 25 double six = (65.0/3); 26 System.out.println("six = " + six); 27 28 double seven = ((55.0/2) + (65.0/3)); 29 System.out.println("seven = " + seven); 30 31 // Task 5 32 double eight = (3.14 * (11.3 * 11.3)); 33 System.out.println("eight = " + eight); 34 35 double nine = (27.7 * 27.7); 36 System.out.println("nine = " + nine); 37 38 double ten = ((eight + nine) / 2); 39 System.out.println("ten = " + ten); 40 41 double eleven = (243.5 * .17); 42 System.out.println("eleven = " + eleven); 43 44 // Task 6 45 int twelve = (3/3); 46 System.out.println("twelve = " + twelve); 47 48 int thirteen = ((4 * 2) - 7); 49 System.out.println("thirteen = " + thirteen); 50 51 int fourteen = ((9 - 7) + (3 - 1)); 52 System.out.println("fourteen = " + fourteen); 53 54 int fifteen = (((8 - 4) - 2) + (6 / 2)); 55 System.out.println("fifteen = " + fifteen); 56 57 } 58 } 59