C++学习(36)
1 //設(shè)計一個有參數(shù)操作符使用方法的例子
2 #include<iostream.h>
3 #include<iomanip.h>
4 int main(){
5 const double PI=3.141592653589793;
6 cout<<"PI="<<setprecision(10)<<PI<<endl;
7
8 int k;
9 cin>>oct>>k;
10 cout<<"k="<<hex<<k<<endl;
11
12 float d=324.567;
13 cout<<"d="<<setw(10)<<setprecision(5)<<setfill('*')<<dec<<d<<endl;
14
15 return 0;
16 }
?
轉(zhuǎn)載于:https://www.cnblogs.com/Tobi/p/9250834.html
總結(jié)
- 上一篇: SqlServer2012清除日志文件
- 下一篇: CommonJs模块规范