标签:hex IV out 十进制 set 5.5 img main str
1 //分别用十进制、十六进制和科学计数法格式输出3个数 2 #include<iostream.h> 3 int main(){ 4 int count=432; 5 int state=1234; 6 float x=555.55; 7 8 cout.setf(ios::dec); 9 cout<<"count="<<count<<endl; 10 11 cout.setf(ios::hex); 12 cout<<"state="<<state<<endl; 13 14 cout.setf(ios::scientific); 15 cout<<"x="<<x<<endl; 16 return 0; 17 }
标签:hex IV out 十进制 set 5.5 img main str
原文地址:https://www.cnblogs.com/Tobi/p/9250826.html