| ||||||||||
| 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 | |||||||||
double 可以In Reply To:这题float能过, 但是double不行, 不知道为什么. Posted by:rambo9567 at 2015-09-24 00:28:17 #include <iostream>
#include <iomanip>
using namespace std;
int main(){
double s=0,i;
cout<<fixed;
cout.precision(2);
for (int t=1;t<13;t++)
{cin>>i;s+=i;}
s/=12;
cout<<"$"<<s<<endl;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator