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 |
Re:why Runtime Error!!!!In Reply To:why Runtime Error!!!! Posted by:hellobuy at 2007-03-06 00:52:16 > #include <stdio.h> > #include <cmath> > int main() > { > int r,y,i; long m; double tmp,sum; > scanf("%d %d %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