Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int a = 1;
- int b = 1;
- int c = 1;
- bool found = false;
- for(a = 1; a < 400 && !found; a++) {
- for(b = 1; b < a && !found; b++) {
- c = sqrt(pow(a, 2) + pow(b, 2));
- if(a + b + c == 1000)
- found = true;
- }
- }
- cout << a*b*c << endl;
Advertisement
Add Comment
Please, Sign In to add comment