setw cout
#include<iostream> #include<iomanip> using namespace std; int main(){ double a; cin>>a; cout<<fixed<<setprecision(2)<<a<<endl; return 0; } #include<iostream> #include<iomanip> using namespace std; int main(){ int a=13,b=15; char c; cin>>a>>b>>c; cout<<setw(38)<<a<<endl; cout<<setw(37)<<c<<b<<endl; cout<<setw(41)<<"--------"<<endl; if(c=='+'){ cout<<setw(38)<<a+b<<endl; }else{ cout<<setw(38)<<a-b<<endl; } }