Guest User

Untitled

a guest
Jul 17th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import java.lang.Math;
  2. /**
  3. * Write a description of class PiCalculator here.
  4. *
  5. * @author (your name)
  6. * @version (a version number or a date)
  7. */
  8. public class PiCalculator
  9. {
  10. public static void main(String[] args){
  11. int pi;
  12. //int sqrt = Math.sqrt(2);
  13. double k = 3;
  14.  
  15. pi = ((1 / Math.pow(16,k)) * (4 / (Math.pow(8,k)) + 1) - (2 / Math.pow(8,k) + 4)) - (1 / (Math.pow(8,k)) + 5) - (1 / (Math.pow(8,k) + 6));
  16. }
  17. }
Add Comment
Please, Sign In to add comment