Have tried with some math logics to solve this problem .
a^2+ b^2= C^2
a+b+c=1000
Finally with help of computer solved this problem..
for a in 1..500
for b in 1..500
for c in 1..500
if (a+b+c) == 1000
if (a*a) +(b*b) == (c*c)
p a,b,c
exit
end
end
end
end
end
Results : 200 ,375 ,425
a^2+ b^2= C^2
a+b+c=1000
Finally with help of computer solved this problem..
for a in 1..500
for b in 1..500
for c in 1..500
if (a+b+c) == 1000
if (a*a) +(b*b) == (c*c)
p a,b,c
exit
end
end
end
end
end
Results : 200 ,375 ,425
No comments:
Post a Comment