Hello,
For an assignment i need to make a neat table to organize my data. The data needs to be read in using cin, or infile. I've written the code, formulas and prompts. But I am having trouble in figuring out what to write to make this table work.
This is way the way I would like my table to look (minus all the dots):
Employee number.....Hours Worked.....Rate of Pay.....Total Earned
____..........................____..................____................_____
____..........................____..................____................_____
____..........................____..................____................_____
The blanks represent where i would like to read in the information for the first three columns then the total earned would be calculated using the formula: total=hours*pay. It is also okay if the table comes at the very end after having read in all the data, so long as it is aligned.
here's the code that does not do exactly what i want:
1 2 3 4 5
|
cout << "Customer #" << "\tAmount Ordered" << "\t\tAmount Paid"
<< "\tBalance" << endl << endl;
cout << customer << "\t\t$" << ordered << "\t\t\t$" << paid << "\t\t\t$"
<< balance << endl;
|
I've tried this code in the while loop as well as out.