Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main() {
- int a, b, c;
- for (c = 0; c < 1000; c++) {
- for (b = 0; b < c; b++) {
- for (a = 0; a < b; a++) {
- if (a + b + c == 1000 && a*a + b*b == c*c) {
- std::cout << a << "\t" << b << "\t" << c << "\t" << a*b*c << "\n";
- goto postloop;
- }
- }
- }
- }
- postloop:
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement