c++随笔【显示数值,八进制,十六进制等】

来源:互联网 发布:淘宝讲师爱上黄昏 编辑:程序博客网 时间:2024/05/20 13:37
#include <iostream>using namespace std;int main(int argc, const char * argv[]) {    // insert code here...    int x1;    int x2;    int x3;    x1=21;    x2=21;    x3=21;    cout<<oct ;    cout<<"x1:"<<x1<<endl;    cout<<hex;    cout<<"x2:"<<x2<<endl;    cout<<dec;    cout<<"x3:"<<x3<<endl;    return 0;}x1:25x2:15x3:21Program ended with exit code: 0

阅读全文
0 0
原创粉丝点击