Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
是呀真奇怪In Reply To:Re:好奇怪,哪位帮我看看 Posted by:13lazyrainy at 2008-05-02 16:52:25 #include <cstdlib> #include <iostream> using namespace std; int main() { // int r,m,y,i,a; double r,m,a,i,t,k,b[500]; cin>>r; cin>>m; int y; cin>>y; //t=static_cast<double>(r); k=(1+(r/100)); b[0]=m; for(int i=0;i<y+1;i++) { b[i+1]=b[i]*k; } cout<<static_cast<int>(b[y]); // cout<<a; system("PAUSE"); return EXIT_SUCCESS; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator