学习目标: 用C++编写简单程序 学习内容: #include<iostream> using namespace std; int main(){ int M,N,X,S=0; cin>>M>>N>>X; while(X--){ S+=N; if(S>=M){ S=M; N=N+M/N; S=0; } } cout<<N<<endl; return 0; }