Skip to content

Commit e33918b

Browse files
committed
Changed triple with math pow
1 parent 656efd2 commit e33918b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

squirrel/triple.nut

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ for (local c = 1; c < 41; c++)
44
{
55
for (local a = 1; a < b; a++)
66
{
7-
if (a * a + b * b == c * c)
7+
if (pow(a, 2) + pow(b, 2) == pow(c, 2))
88
{
99
printf("%d, %d, %d\n", a, b, c)
1010
}

0 commit comments

Comments
 (0)