Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
C ++で右揃えになるようにコンソール出力をフォーマットするにはどうすればよいですか?
マニピュレータフラグを使用するstd::right
std::right
例
また
これは動作します...
#include<iostream> using std::cout; using std::endl; #include<iomanip> using std::setw; int main(){ int x = 12345; cout << "Blah Blah Blah" << endl << setw(80) << x << endl; system("pause"); return 0; }