Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PE #9
//Title of this code //'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_45 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int sum = 0; int TARGET = 1000; int sqrTAR =(int) Math.sqrt(TARGET); double c = 0; for (int b=2; b<1000; b++) { for (int a=1; a<1000; a++) { c = getC(a, b); if (((a + b + c)==TARGET)&&(a<b)) { System.out.println("a: "+a+", b: "+b+", c: "+c); double ans = a*b*c; System.out.println("Ans: "+ans);} } } } public static double getC(int a, int b) { double getc = 0; getc = Math.sqrt((double)(a*a) + (b*b)); return getc; } }
run
|
edit
|
history
|
help
0
piglatin
Variables&Types
Java Object structure dumper (iterative)
BinaryTreeFindNext_noParentPointer
MyBankAppFinal
Problem_fib
jb11.0 threads tick tock 1.0
pass
contoh 43
bookstore