Skip to content

Instantly share code, notes, and snippets.

@erenon
Created October 28, 2010 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erenon/652232 to your computer and use it in GitHub Desktop.
Save erenon/652232 to your computer and use it in GitHub Desktop.
probaNZH f1
#include <stdio.h>
#include <math.h>
int main(){
int a,b;
double c;
a=1;
for(a=1;a<10000;a++) {
for(b=a;b<10000;b++) {
c = sqrt(a*a+b*b);
if(c <= 10000 && c == floor(c)) {
printf("%d %d %lg\n",a,b,c);
}
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment