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

java 1004 ac

Posted by mfkidtfws at 2009-08-22 16:27:18 on Problem 1004 and last updated at 2009-08-22 16:32:42
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in); 
		double sum = 0;
		for (int i = 0; i < 12; i ++) {
			sum += in.nextDouble();
		}
		System.out.println("$" + (double)((int)((sum/12)*100))/100);
	}
}

这道题太恶心拉!让人猜输出!
format 都不行
这样倒弄一下却可以!
恶

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