| ||||||||||
| 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:各位大虾们 这错在哪里啊In Reply To:各位大虾们 这错在哪里啊 Posted by:luoxiaocheng at 2008-08-15 10:47:54 #include<iostream>
using namespace std;
int main()
{
double money[12],average=0;
int index;
for(index=0;index<12;index++)
{
cin>>money[index];
average+=money[index];
}
average/=12;
cout<<'$';
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);
cout<<average<<endl;
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator