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