Author: nefari0uss
This program will request the approximate number of calculations to run in calculating π. The final result will be displayed on the console. Does not use the Math class. Assumption is that the user inputs an int.
Uses the Gottfried Leibniz formula for calculation of π:
1 - 1/3 + 1/5 - 1/7 + 1/9 - ... = π/4
Source: Wikipedia - Leibniz formula for π
- Use the given make file.
- Alternatively, compile:
$ javac Pi.java
- Run:
$ java Pi