int x; float a,b; for(x=1;x<100000;x++){ a=sqrt(x+100); b=sqrt(x+168); if((int)a==a&&(int)b==b) printf("%d",x); }
#include <stdio.h> int main( void ) { for( unsigned a=10,b=13; ; ) { unsigned delta = b*b-a*a; if( delta > 68 ) ++a; else if( delta < 68 ) ++b; else { printf( "%u\n", a*a-100 ); break; } printf( "a=%u b=%u\n", a, b ); continue; } return 0; }