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

初来乍到求问为什么求平均数这种水题都WA,c++ok,g++不行。。

Posted by gcy_acm at 2016-07-18 23:14:15
附代码
#include <cstdio>
using namespace std;
int main(){
	int i;
	double balance, sum;
	sum = 0.0;
	for (i = 0; i < 12; ++i){
		scanf("%lf", &balance);
		sum += balance;
	}
	printf("$%.2lf\n", sum / 12);
	return 0;
}
用g++怎么提交都是WA
QAQ

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