正在加载图片...
C+语言程序设计 第三章结构化程序设计 < setprecision(4)<<test < endl cout < setiosflags(ios: fixed); cout <<setprecision ( 8)<< test < endl i ∥ setiosflags(ios:; e fixed)与 setprecision(8)合用,控制小数点右边的 数字个数为8 cout < setprecision (6) ∥重新设置成C++默认流输出 数值有效位 程序的运行结果为: 3.14286 33C++语言程序设计 第三章 结构化程序设计 << setprecision(4) << test << endl ; cout << setiosflags(ios::fixed) ; cout <<setprecision(8) << test << endl ; // setiosflags(ios::fixed) 与 setprecision(8)合用,控制小数点右边的 数字个数为8 cout << setprecision(6) ; // 重新设置成C++默认流输出 数值有效位 } 程序的运行结果为: 3.14286 3 3
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有