#include#include//修改精度using namespace std;int main(){ double sum=0,h=100,i=1; while(i<=20) { if(i==1) sum=sum+h; else sum=sum+2*h; h=h/2; cout< i++; } printf("%lf\n",sum); return 0;}