Advertisement
Guest User

pi accuaracy

a guest
Nov 30th, 2010
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. class Main {
  2.         public static void main(String argv[]) {
  3.                 String pi_string = "3.14159265358979323846264338327950288419716939937510";
  4.                 double pi_double = 3.14159265358979323846264338327950288419716939937510;
  5.                 float pi_float = (float)3.14159265358979323846264338327950288419716939937510;
  6.                 System.out.println("As string: " + pi_string);
  7.                 System.out.println("As double: " + pi_double);
  8.                 System.out.println("As float: " + pi_float);
  9.         }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement