Advertisement
ruhan008

Python Assignment 4

Feb 2nd, 2024 (edited)
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. for a in range(1,333):
  2.     for b in range(a+1,1000):
  3.         c = 1000 - (a+b)
  4.         if(c<=b):
  5.             break;
  6.         if(((a**2) + (b**2)) == (c**2)):
  7.             print( "a =", a ,", b =", b ,", c =", c )
  8.             print("a * b * c = ",a*b*c)
  9.  
  10. # OUTPUT:
  11.  
  12. # a = 200 , b = 375 , c = 425
  13. # a * b * c =  31875000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement