Special pythagorean triplet: Difference between revisions

Added XPL0 example.
(Added Algol W)
(Added XPL0 example.)
Line 200:
}
}</lang>
 
=={{header|XPL0}}==
<lang XPL0>int N, M, A, B, C;
for N:= 1 to sqrt(1000) do
for M:= N+1 to sqrt(1000) do
[A:= M*M - N*N; \Euclid's formula
B:= 2*M*N;
C:= M*M + N*N;
if A+B+C = 1000 then
IntOut(0, A*B*C);
]</lang>
 
{{out}}
<pre>
31875000
</pre>
772

edits