Right justification
#include <iostream> #include <iomanip> using namespace std; int main(void){ int i; cout << "Right justification\n"; for (i = 0; i < 3; i++){ cout.width(5); cout << setiosflags(ios::right) << i; } }