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:float精度不够In Reply To:Re:float精度不够 Posted by:hejinlong55 at 2005-11-23 09:21:17 #include<stdio.h> #include<math.h> void main(){ float a[12]; float result=0; int i; for(i=0;i<11;i++){ scanf("%f",&a[i]); } for(i=0;i<11;i++){ result=result+a[i]; } result=result/12; printf("$%.2f\n",result); } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator