You can use <iomanip.h> =>
For formatted input/output, the file <iomanip.h> is very useful,
and we can say it is the key factor.
cout << setiosflags(ios::left); //to left-adjustify the output.
cout << setw(8) << "Hello" << endl;
The problem is solved. :) easy?
Do make yourself familiar with <iomanip.h>
Wish you a good day!
and we can say it is the key factor.
cout << setiosflags(ios::left); //to left-adjustify the output.
cout << setw(8) << "Hello" << endl;
The problem is solved. :) easy?
Do make yourself familiar with <iomanip.h>
Wish you a good day!