#include <stdio.h> int main( void ) { double pi_quarter = 0; for( int i=1; i<1000000; i+=2 ) pi_quarter += 1.0/i * (1-(i-1)%4); printf( "%f\n", 4*pi_quarter ); // 一种可能的输出 3.141591 (3.141590653589691140012973846751265227794647216796875) }