>>962 #include <stdio.h>
#define EPS 0.000001
#define PI 3.14159265
main( ){
int k;
double diff, tmp = 0, p2 = ( PI ) * ( PI ) / 6.0;
for ( k = 1;; k++ ) {
tmp += 1.0 / ( ( ( double ) k ) * k );
diff = p2 < tmp ? tmp - p2 : p2 - tmp;
if ( diff < EPS ) break;
}
printf( "N=%d ; pi^2/6=%.15lf; 1/1+...+1/N^2 = %.15lf; diff=%.15lf \n", k, p2\
, tmp, diff );
}