falyptus

ResolveProblem9

May 23rd, 2012
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. public static void ResolveProblem9()
  2. {
  3.     for(int a = 1; a < 500; a++)
  4.     {
  5.         for(int b = a+1; b < 500; b++)
  6.         {
  7.             double c = Math.sqrt(Math.pow(a, 2.0)+Math.pow(b, 2.0));
  8.             if(a+b+c == 1000)
  9.             {
  10.                 int e = (int) (a*b*c);
  11.                 System.out.println("Lookup: "+ e);
  12.             }
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment