正在加载图片...
操纵符(浮点数输出格式) 口以定点格式输出浮点数:fixed cout<fixed;∥定点格式 for (int i=0;i<3;i++) cout <a[i]; ▣ 以科学计数法(指数形式)输出浮点数:scientific ex07_fixed_scientific.cpp doub1ea[3]={2.7182818,31.416,987080}; cout<scientific;/∥以指数形式输出 for (int i=0;i<3;i++) cout <a[i]; 10 http://math.ecnu.edu.cn/~jypanhttp://math.ecnu.edu.cn/~jypan 操纵符(浮点数输出格式) 10  以定点格式输出浮点数:fixed  以科学计数法(指数形式)输出浮点数:scientific double a[3]={2.7182818, 31.416, 987000}; cout << scientific; // 以指数形式输出 for (int i=0; i<3; i++) cout << a[i]; ex07_fixed_scientific.cpp cout << fixed; // 定点格式 for (int i=0; i<3; i++) cout << a[i];
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有