📄 705.cpp
字号:
//705.CPP demo use stream format
#include <iostream.h>
main(void)
{
cout.setf(ios::showpos);
cout.setf(ios::scientific);
cout << 123 << " "<< 123.456 << endl;
cout.precision(3);// two digits after decimal point
cout.width(10);// in a field of ten characters
cout << 123 << " "<< 123.456 << endl;;
cout.fill('#');// fill using#
cout.width(10);// in a field of ten characters
cout.unsetf(ios::scientific|ios::showpos);
cout.precision(5);// two digits after decimal point
cout << 123 << " " << 123.456;
return 0;
}
/*-
+123 +1.234560e+02
+123 +1.235e+02
#######123 123.46
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -