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

Re:KAo, 要用C++提交才对,贡献一次WA

Posted by songyy at 2010-11-14 00:33:57 on Problem 1004
In 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:
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