Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

是呀真奇怪

Posted by 550642630 at 2009-08-21 12:33:55 on Problem 2390
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator