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

📄 2_1.cpp

📁 c++书籍的源代码
💻 CPP
字号:
#include <iostream.h>
#include <iomanip.h>
 int main()
{
  cout<<setw(10)<<setiosflags(ios::left)<<"DATA1"
	  <<setw(10)<<setiosflags(ios::left)<<"DATA2"
	  <<setw(10)<<setiosflags(ios::left)<<"DATA3"<<endl;
  cout<<setw(10)<<setiosflags(ios::fixed)<<setprecision(2)<<102.34
	  <<setw(10)<<setiosflags(ios::fixed)<<setprecision(2)<<100.23
	  <<setw(10)<<setiosflags(ios::fixed)<<setprecision(2)<<10.20<<endl;
  cout<<setw(10)<<setiosflags(ios::fixed)<<setprecision(2)<<10.0
	  <<setw(10)<<setiosflags(ios::fixed)<<setprecision(2)<<9.8
	  <<setw(10)<<setiosflags(ios::fixed)<<setprecision(2)<<1.34<<endl;
  cout<<setw(10)<<setiosflags(ios::fixed)<<setprecision(2)<<1000.56
	  <<setw(10)<<setiosflags(ios::fixed)<<setprecision(2)<<1234.30
	  <<setw(10)<<setiosflags(ios::fixed)<<setprecision(2)<<145.39<<endl;
  return(0);
}

⌨️ 快捷键说明

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