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:那位牛人能帮我看看这题错在哪了,总是wrong answer呀!快疯了!!!In Reply To:那位牛人能帮我看看这题错在哪了,总是wrong answer呀!快疯了!!! Posted by:Sephiroth_Zhang at 2009-03-23 22:16:58 大哥,你连double都没搞清楚怎么用嘛 改改如下可以AC #include <iostream> using namespace std; int main() { double a[12]; double t=0.0; int i; for(i=0;i<12;i++) scanf("%lf",&a[i]); for(i=0;i<12;i++) { t+=a[i]; } printf("$%.2lf\n",(double)t/12); return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator