第十周项目一程序填充与阅读2
2014-11-02 15:00
281 查看
/* *Copyright (c) 2014, 烟台大学计算机学院 * All right reserved. * 文件名称:test.cpp * 作者:赵嵩 * 完成时间:2014年11月2号 * 版本号:v1.0 * */ #include <iostream> #include <iomanip> using namespace std; int main() { int a=34; cout<<"hex:"<<hex<<a<<endl; cout<<"oct:"<<setbase(8)<<a<<endl; cout<<"dec:"<<dec<<a<<endl; char *pt="china"; cout<<setw(10)<<pt<<endl; cout<<setfill('*')<<setw(10)<<pt<<endl; double d=225.0/7.0; cout<<"d="<<setiosflags(ios::fixed)<<d<<endl; cout<<setprecision(5)<<d<<endl; return 0; }
运行结果:
相关文章推荐
- 第十周项目一 (程序填充与阅读) 1:
- 第十周项目 1 程序填充与阅读(2)
- 第十周项目1-程序填充与阅读(二)
- 第十周 项目一程序填充与阅读之四则运算
- 第十周 项目一:程序填充与阅读(2)
- 第十周项目一 程序填充与阅读
- 第十周项目1-程序填充与阅读(三)
- 第十周项目一 程序的填充与阅读1
- 第十周项目1-程序填充与阅读 选择算式运算符
- 第十周项目1程序填充与阅读(a+b)
- 第十周项目一 程序填充与阅读1
- 第十周 项目一:程序填充与阅读(1)
- 第十周项目一程序填充与阅读
- 第十周项目一——程序填充与阅读(一)
- 第十周项目 1 程序填充于阅读(1)
- 第十周项目一程序填充与阅读(1)
- 第十周 项目一:程序填充于阅读(3)
- 第十周项目1程序填充与阅读(getchar()字符)
- 第十周项目1-程序填充与阅读(三)
- 第十周项目1程序填充于阅读 控制符号