A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a2 + b2 = c2
For example, 32 + 4
As mentioned above, ^ is bitwise xor, not power.
You can also remove the third loop, and instead use c = 1000-a-b; and optimize this a little.
c = 1000-a-b;
Pseudocode
for a in 1..1000 for b in a+1..1000 c=1000-a-b print a, b, c if a*a+b*b=c*c