1 2 /* 3 * Solving arithmetic expressions 4 */ 5 6 7 package expressions; 8 9 public class ExpressionsThing { 10 11 public static void main(String[] args) { 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("thee = " + three); 18 int four = (2 * 3); 19 System.out.println("four = " + four); 20 double five = (45.0 / 2.0); 21 System.out.println("five = " + five); 22 double six = ( 65.0 / 3.0 ); 23 System.out.println("six = " + six); 24 double seven = ( five + six ); 25 System.out.println("seven = " + seven); 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 = ( ( ( eight + nine ) / 2.0) ); 31 System.out.println("ten = " + ten); 32 double eleven = ( 243.5 * 0.17); 33 System.out.println("eleven = " + eleven); 34 int twelve = ( 3 / 3 ); 35 System.out.println("twelve = " + twelve); 36 int thirteen = ( ( 7 - 4 ) - 2 ); 37 System.out.println("thirteen = " + thirteen); 38 int fourteen = ( ( (9 - 7) + 3 ) - 1 ); 39 System.out.println("fourteen = " + fourteen ); 40 int fifteen = ( ( (8 - 6) + 2) + ( 2 / 2) ); 41 System.out.println("fifteen = " + fifteen); 42 43 44 } 45 } 46