/home/akc/NetBeansProjects/CS1/src/expressions/ExpressionsThing.java
 1 /*
 2  * This program affords opportunities to explore the construction of arithmetic
 3  * expressions in the context of some very simple problem solving.
 4  */
 5 package expressions;
 6 
 7 /**
 8  *
 9  * @author akc
10  */
11 public class ExpressionsThing {
12 
13     /**
14      * @param args the command line arguments
15      */
16     public static void main(String[] args) {
17         double one = 3.14 * 5 + 5;
18         System.out.println("one = " + one);
19         double two = 3.14 * (5 + 5);
20         System.out.println("two = " + two);
21         double three = (3.14 * (5 + 5));
22         System.out.println("three = " + three);
23         // One doesn't produce the expected result
24         // Three is the only one that is fully parenthesized
25         // One doesn't produce the expected result
26         // Three is the only one that is fully parenthesized
27         
28         int four = (2 * 3);
29         System.out.println("four = " + four);
30         double five = ((double) 55/ (double) 2);
31         System.out.println("five = " + five);
32         double six = ((double)65/(double)3);
33         System.out.println("six = " + six);
34         double seven = (five + six);
35         System.out.println("seven = " + seven);
36         
37         double eight = (3.14 * (11.3 * 11.3));
38         System.out.println("eight = " + eight);
39         double nine = (27.7 * 27.7);
40         System.out.println("nine = " + nine);
41         double ten = ((eight + nine)/2.0);
42         System.out.println("ten = " + ten);
43         double eleven = (0.17 * 243.5);
44         System.out.println("eleven = " + eleven);
45         
46         int twelve = (3/3);
47         System.out.println("twelve = " + twelve);
48         int thirteen = ((7 - 2) - 4);
49         System.out.println("thirteen = " + thirteen);
50         int fourteen = ((3-1)+(9-7));
51         System.out.println("fourteen = " + fourteen);
52         int fifteen = ((6-(8/4))+(2/2));
53         System.out.println("fifteen = " + fifteen);
54 ;
55     }
56     
57 }
58