HI is there alternate simple way for the following code to get printed.
1 2 3
cout<<"___________________________________________________________________"<<endl;
cout<<left<<"First name Last name Number of books bought Amount (in $)"<<endl;
cout<<"___________________________________________________________________"<<endl;
How to use setfill function for the line 1 and 3 and only for the line 1 and 3.
#include <string>
string Line(70,'_'); // Change number to how long the underline will be.
// Change variable Line, to whatever you want the name to be.
// And lastly, change the '_', to whatever you want printed. Only one character, though
cout << Line << endl;
cout<<left<<"First name Last name Number of books bought Amount (in $)"<<endl;
cout << Line << endl;