#include <stdio.h> int main( void ) { unsigned count = 20; double sum = 0; for( unsigned i=0,a=1,b=1; i!=count; ++i ) { b = b+a; a = b-a; sum += b*1.0/a; } printf( "%f\n", sum ); }
[此贴子已经被作者于2019-5-15 19:39编辑过]