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 zhaoyicheng at 2007-11-03 11:24:23 on Problem 1004
In Reply To:我晕了,找了好多遍不知道哪错,帮看看,谢谢 Posted by:omepu at 2006-01-04 16:16:35
> 用的C++,但是cout<<setpresicion(2)<<sumn<<endl;不好使。
> 
> 现在这个样子帮我看看哪不行啊?
> 
> #include <iostream>
> using namespace std;
> 
> int main()
> {
> 	double sumn = 0 , month;
> 	int i = 1;
> 	while (i <= 12)
> 	{
> 		cin >> month;
> 		sumn = sumn + month;
> 		++i;
> 	}
> 	sumn = sumn / i + 0.05;
> 	printf("$%.2f\n" , sumn);
> 	return 0;
> }

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