提交时间:2024-05-27 20:55:34
运行 ID: 48149
#include <iostream> using namespace std; int main(){ double h,total=0.0; cin>>h; total=total+h; h=h/2; for(int i=2;i<=10;i++) { total=total+2*h; h=h/2; } cout<<total<<endl; cout<<h<<endl; return 0; }