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 |
java 1004 acimport 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator