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 |
经验总结这个题目实在太简单了,可是小问题还是有的,首先我记得C++里面有控制小数点精度的流操作符,或者是函数 如下: 1 cout.precison(n) 2 cout << setprecison(n) 两种方法都可以,可是直接用就是科学记数法显示, 后来查了c++ primer才知道必须这样写: cout << '$' << fixed << setprecision(2) << average; 这样就好了.呵呵希望能给大家帮助! Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator