Pythagorean triple by nanayaT

for(i<-3 to 100){val s=i*i;for(j<-3 to 5000){val t=Math.sqrt(j*j+s);if(t==t.toInt.toDouble)println(i+" "+j+" "+t.toInt)}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page