Problem 9 solution - A naive implementation
More...
#include <stdio.h>
Problem 9 solution - A naive implementation
- Author
- Krishna Vedala
◆ main()
Main function.
12 for (
int a = 1; a < 300; a++)
13 for (
int b = a + 1; b < 400; b++)
14 for (
int c = b + 1; c < 500; c++)
16 if (a * a + b * b == c * c)
17 if (a + b + c == 1000)
19 printf(
"%d x %d x %d = %ld\n", a, b, c,