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