1 /*Exploring the arithmetic expressions in the context of simple problem solving.*/ 2 3 package expressions; 4 5 public class ExpressionsThing { 6 public static void main(String[] args) { 7 double one = 3.14 * 5 + 5; 8 System.out.println("one = " + one); 9 10 double two = 3.14 * ( 5 + 5 ); 11 System.out.println("two = " + two); 12 13 double three = ( 3.14 * ( 5 + 5 ) ); 14 System.out.println("three = " + three); 15 16 // Expressions from English 17 18 int four = (2*3); 19 System.out.println("four = " + four); 20 21 double five = ( 55 / 2 ); 22 System.out.println("five = " + five); 23 24 double six = ( 65 / 3 ); 25 System.out.println("six= " + six); 26 27 double seven = ((55 / 2 ) + ( 65 / 3 )); 28 System.out.println("seven = " + seven); 29 30 // Computations based on geometric algebraic conceptions 31 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 // Solving Crypto problems 45 46 // 3 and 3 as sources and that evaluates to the number 1 as goal. 47 double twelve = ( ( 3 / 3 )); 48 System.out.println("twelve = " + twelve); 49 // 4 and 7 and 2 as sources and that evaluates to the number 1 as goal. 50 double thirteen = ( ( 7 - 4 ) - 2 ); 51 System.out.println("thirteen = " + thirteen); 52 // 1 and 3 and 7 and 9 as sources and that evaluates to the number 4 as goal. 53 double fourteen = ( (3 - 1) + (9 - 7)); 54 System.out.println("fourteen = " + fourteen); 55 // 2 and 2 and 4 and 6 and 8 as sources and that evaluates to the number 5 as goal. 56 double fifteen = ( ((((6 +2) + 2) * 4) / 8) ); 57 System.out.println("fifteen = " + fifteen); 58 } 59 } 60