| ||||||||||
| 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 | |||||||||
why Runtime Error!!!!#include <stdio.h>
#include <cmath>
int main()
{
int r,y,i; long m; double tmp,sum;
scanf("%d %ld %d",&r,&m,&y);
sum=m;
for(i=1; i<=y; i++) {
tmp=(double)r/100;
sum=sum*(1+tmp);
}
printf("%d\n",int(sum));
return 1;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator