问题
单项选择题
有以下程序:
#include <iostream.h>
#include
void main() double d= 123.456789;
cout<<setprecision(3)<<d<<",";
cout<<setprecision(4)<<d<<",";
cout<<setprecision(5 )<<d<<end1;程序执行后的输出结果是( )。
A.123,123.4,123.45
B.123,123.5,123.46
C.123,123,123.4
D.123.456789,123.456789,123.456789
答案
参考答案:B