| ||||||||||
| 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:KAo, 要用C++提交才对,贡献一次WAIn Reply To:KAo, 要用C++提交才对,贡献一次WA Posted by:Minori at 2010-11-05 22:35:11 I used C++, but got Compile error...
Succeed when using G++, code:
#include <stdio.h>
main(){
double in,sum=0;
int i;
for(i=0;i<12;i++){
scanf("%lf",&in);
sum+=in;
}
printf("$%.2f",sum/12);
return 0;
}
It's quite confusing that... If I use printf("lf") rather than printf("f"), I'll get a WA...
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator