fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void pitagoras(int N)
  5. {
  6. int l = 0;
  7. for(int a = 99; a <= N - 2; a ++){
  8. for(int b = a+1; b <= N - 1; b++){
  9. for(int c = b + 1; c <= N; c++){
  10. if(a * a + b * b == c * c){
  11. l++;
  12. }
  13. }
  14. }
  15. }
  16. cout << l << endl;
  17. }
  18.  
  19. int main(){
  20. pitagoras(999);
  21. }
  22.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty