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:why Runtime Error!!!!

Posted by 550642630 at 2009-08-21 11:01:46 on Problem 2390
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:
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