/Users/lyon/j4p/src/bookExamples/ch16Readers/Compute.java
|
1 // compute c = a + b
2 package bookExamples.ch16Readers;
3
4 import futils.Out;
5 import futils.ReaderUtil;
6
7 public class Compute {
8
9 public static void main(String args[]) {
10 double a = ReaderUtil.getDouble("Enter a: ");
11 double b = ReaderUtil.getDouble("Enter b: ");
12 double c = a + b;
13 Out.print(a + b + "=" + a + "+" + b);
14 Out.print(a - b + "=" + a + "-" + b);
15 Out.print(a * b + "=" + a + "*" + b);
16 Out.print(a / b + "=" + a + "/" + b);
17 Out.print(a % b + "=" + a + "%" + b);
18 boolean bool = false;
19 Out.print(bool + "=b");
20 }
21 }