1 /* 2 * This program explores problem solving with the help of arithmetic expressions 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 * 0.5 ); 20 System.out.println("five = " + five); 21 22 double six = ( ( 65 * 1 / 3.0 ) ); 23 System.out.println("six = " + six); 24 25 double seven = ( ( ( 55 * .5 ) + ( 65 * 1 / 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 31 double nine = (27.7 * 27.7); 32 System.out.println("nine = " + nine); 33 34 double ten = ((eight + nine ) / 2.0); 35 System.out.println("ten = " + ten); 36 37 double eleven = (243 * .17); 38 System.out.println("eleven = " + eleven); 39 40 int twelve = (3 / 3); 41 System.out.println("twelve = " + twelve); 42 43 int thirteen = ((7 - 4) - 2); 44 System.out.println("thirteen = " + thirteen); 45 46 int fourteen = ((9 + 7) / (3 + 1)); 47 System.out.println("fourteen = " + fourteen); 48 49 int fifteen = (((8 * 2) + 6 - 2) / 4); 50 System.out.println("fifteen = " + fifteen); 51 52 53 54 55 56 } 57 } 58