Pythagorean's Challenge

Link to my Solution: https://ide.codingblocks.com/s/260734

My output is correct but both the test cases got failed when I submit.