?? 2_1.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);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -