'commit'
This commit is contained in:
14
RuMenJingDian/Others/FillBlank.cpp
Normal file
14
RuMenJingDian/Others/FillBlank.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false); //读入输出优化的强迫症
|
||||
// 输出宽度10个字符,左对齐,不足补空格,输出3
|
||||
cout << setw(10) << setfill(' ') << left << 3;
|
||||
cout << "i am huanghai!" << endl;
|
||||
|
||||
// 输出宽度5,右对齐,不足补0,输出10
|
||||
cout << setw(5) << setfill('0') << right << 10 << endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user