C++学习(35)
1 //分別用十進制、十六進制和科學計數(shù)法格式輸出3個數(shù)
2 //使用操作符
3 #include<iostream.h>
4 int main(){
5 int count=432;
6 int state=1234;
7 float x=555.55;
8
9 //cout.setf(ios::dec);
10 cout<<"count="<<dec<<count<<endl;
11
12 //cout.setf(ios::hex);
13 cout<<"state="<<hex<<state<<endl;
14
15 cout.setf(ios::scientific);
16 cout<<"x="<<x<<endl;
17 return 0;
18 }
?
轉(zhuǎn)載于:https://www.cnblogs.com/Tobi/p/9250830.html
總結(jié)
- 上一篇: 采用vue-cli安装的一些注意点
- 下一篇: c++输入输出流加速器