标签:code c++ oct ase cout return cas precision ++
#include<iostream> #include<iomanip> using namespace std; int main() { int a=10; double b=314159.26; cout<<a<<endl; cout.unsetf(ios::dec); cout.setf(ios::oct|ios::showbase); cout<<a<<endl; cout.precision(7); cout<<b<<endl; cout.setf(ios::fixed); cout.precision(4); cout<<b<<endl; cout.setf(ios::scientific|ios::uppercase|ios::left); cout.width(20); cout.fill(‘*‘); cout<<-b<<endl; cout.unsetf(ios::scientific|ios::uppercase); cout.precision(6); cout.width(20); cout.fill(‘ ‘); cout<<b<<endl; return 0; }
标签:code c++ oct ase cout return cas precision ++
原文地址:https://www.cnblogs.com/zzyh/p/12067051.html