这样就行了:
#include <bits/stdc++.h> using namespace std; int main() { cout << setfill('*') << setw(28) <<'\n'<<'\n'<< setfill (' ')<<setw(28)<<"hello"; cout<< setfill('*')<<setw(28) << '\n'<<'\n'; return 0; }
你这不正常输出了吗?