Advertisement
nRikee

Angulos cuadrados perfectos

Sep 28th, 2012
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     /**
  8.       * a^2 + b^2 + c^2 = 180
  9.       */
  10.  
  11.       for (int a=1;a<=13;a++){
  12.         for(int b=1;b<=13;b++){
  13.             for(int c=1;c<=13;c++){
  14.                 if(a*a+b*b+c*c==180) cout << "\n" << a*a << ", " << b*b << ", " << c*c;
  15.                 }
  16.         }
  17.       }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement