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

Re:好奇怪,哪位帮我看看

Posted by jingzhe at 2011-04-04 21:19:57 on Problem 2390
In Reply To:好奇怪,哪位帮我看看 Posted by:rank at 2008-03-29 17:09:37
> #include "iostream"
> #include"math.h"
> using namespace std;
> int main()
> {
>     double R,M,Y,sum,mm;
>     cin>>R>>M>>Y;
>     double k=R/100+1;
>     sum=M;
>     
>     mm=(int)(sum*pow(k,Y));
>     cout<<mm;
>     return 0;
> }
> //这个不能过,而下面能过,台奇怪了.....
> #include "iostream"
> #include"math.h"
> using namespace std;
> int main()
> {
>     double R,M,Y,sum,mm;
>     cin>>R>>M>>Y;
>     double k=R/100+1;
>     sum=M;
>     
>     cout<<(int)(sum*pow(k,Y));
>  
>     return 0;
> }
> 
> 上面已经给mm定义为double型数据了,你输出mm输出的就是double型数据了。不合题意。
> 
> 
> 

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