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:经验总结

Posted by lht1019 at 2009-03-09 19:55:31 on Problem 1004
In Reply To:经验总结 Posted by:Ontheline at 2008-07-10 11:23:25
> 这个题目实在太简单了,可是小问题还是有的,首先我记得C++里面有控制小数点精度的流操作符,或者是函数
> 如下:
> 1 cout.precison(n)
> 2 cout << setprecison(n)
> 两种方法都可以,可是直接用就是科学记数法显示,
> 后来查了c++ primer才知道必须这样写:
> cout << '$' << fixed << setprecision(2) << average;
> 这样就好了.呵呵希望能给大家帮助!

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