1 package expressions; 2 // Program to explore the construction of arithmetic expressions through simple problem solving contexts 3 public class ExpressionsThing { 4 5 public static void main(String[] args){ 6 double one = 3.14 * 5 + 5; 7 System.out.println("one = " + one); 8 double two = 3.14 * ( 5 + 5 ); 9 System.out.println("two = " + two); 10 double three = ( 3.14 * ( 5 + 5 ) ); 11 System.out.println("three = " + three); 12 int four = ( 2 * 3 ); 13 System.out.println("four = " + four); 14 double five = ( 55 * 0.5 ); 15 System.out.println("five = " + five); 16 double six = ( 65.0 / 3 ); 17 System.out.println("six = " + six); 18 double seven = ( ( 55.0 / 2 ) + ( 65.0 / 3) ); 19 System.out.println("seven = " + seven); 20 double eight = ( 3.14 * ( 11.3 * 11.3 ) ); 21 System.out.println("eight = " + eight); 22 double nine = ( 27.7 * 27.7 ); 23 System.out.println("nine = " + nine); 24 double ten = ( ( nine + eight) / 2 ); 25 System.out.println("ten = " + ten); 26 double eleven = ( 243.5 * .17 ); 27 System.out.println("eleven = " + eleven); 28 int twelve = ( 3 / 3 ); 29 System.out.println("twelve = " + twelve); 30 int thirteen = ( ( 7 - 4 ) - 2 ); 31 System.out.println("thirteen = " + thirteen); 32 int fourteen = ( ( 9 + 3) - ( 7 + 1 ) ); 33 System.out.println("fourteen = " + fourteen); 34 int fifteen = ( ( ( ( 4 * 2 ) - 6 ) + 8 ) / 2 ); 35 System.out.println("fifteen = " + fifteen); 36 } 37 } 38