⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chapter2-4.cpp

📁 C++STL程序员开发指南
💻 CPP
字号:
//文件名:CHAPTER2-4.cpp
#include<iostream.h>
#include<iomanip.h>
void main()
{
	int  i=63;
	float  pai=3.14;
	cout.setf(ios::hex,ios::basefield);
	cout.setf(ios::showbase);
	cout<<i<<endl;
	cout.unsetf(ios::showbase);
	cout<<i<<endl;
	cout.setf(ios::uppercase);
	cout<<i<<endl;
	cout.setf(ios::showpoint);
	cout<<pai<<endl;				//显示3.14000
	cout.setf(ios::scientific,ios::floatfield);
	cout<<pai<<endl;				//显示3.140000E+000
	cout.setf(ios::left,ios::adjustfield);
	cout.width(10);
	cout.fill('¥');
	cout<<"%%%"<<endl;			//显示"%%%¥¥¥¥¥¥¥"
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -