11_14.cpp
来自「c++案例教程源代码」· C++ 代码 · 共 13 行
CPP
13 行
#include <iostream>
using namespace std;
int main()
{ double x = 0.0001234567; double y = 1.846e8;
//按照默认格式显示
cout << "Displayed in default format:\n" << x << '\t' << y << endl;
//按科学计数法显示
cout << "Displayed in scientific format:\n" << scientific << x << '\t' << y << endl;
//按定点格式显示
cout << "Displayed in fixed format:\n" << fixed << x << '\t' << y << endl;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?