:) :) :)
所在版块:求学狮城 发贴时间:2003-03-21 05:48  评分:

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 

What is your problem?

Do you want the output to be like this:(suppose tax=0.053)

--------------------------------Tax--------------0.05

?

//Before Tax 32 blanks and after Tax 14 blanks.





I think you might not be able to get 0.05, right?

This is because setprecision() should be used together

with "showpoint" or "fixed".

You can try this:

cout << "\t\t\t\t" << setiosflags(ios:left) << setw(17)
<< "Tax" << setiosflags(ios:fixed) << setprecision(2)
<< tax << endl << endl;

.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!

Put your OWN COOL signature here!
 相关帖子 我要回复↙ ↗回到正文
,急,关于c++ D   (112 bytes , 397reads )
打错了,请看这 D   (93 bytes , 365reads )
:) :) :) 魅力十足   (498 bytes , 260reads )