fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. for (int x = 0; x <= 100; x++) {
  7. for (int y = 0; y <= 100; y++) {
  8. if ((x * x + y * y) == 10000) {
  9. cout << "x: " << x << " - y: " << y << endl;
  10. }
  11. }
  12. }
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 4560KB
stdin
Standard input is empty
stdout
x: 0 - y: 100
x: 28 - y: 96
x: 60 - y: 80
x: 80 - y: 60
x: 96 - y: 28
x: 100 - y: 0