``1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889`` ``````#include #include using namespace std; void get_emp_rec(int &id, double &prate, double &hours) { cout << "Employee ID is:\t"; cin >> id; cout << "Payrate is:\t"; cin >> prate; cout << "Hours worked are:\t"; cin >> hours; } double compute_gpay(double hours, double prate) { double gpay; // to hold the gross pay gpay= hours * prate; return (gpay); } double compute_taxes(double gpay) { double td; // to hold the tax deduction if (gpay <= 1000) td = gpay * 0.05; else td= gpay * 0.06; return(td); } double compute_npay(double gpay) { double npay, td; td=compute_taxes(gpay); npay = gpay - td; return (npay); } void printtables(int ids[], double gpays[], double npays[], int size) { for(int j=0; j< size;j++) { cout << setw( 7 )<< j << setw( 10 ) << ids[ j ] << endl; } cout << "Employee ID" << setw(10)<< "Gross Pay" <
how do i get the outputs to look like a table:
Employee ID........Gross Pay..........Net Pay
101.................540.58...............480.40
158.................796.32................630.20
Anyone?!?!?!?!
Last edited on
looked at that already and it has not helped, been doing this for 4 hours (way too long)
What do you mean it doesn't help?
 `` `` ``cout << setw(20) << std::left << std::setfill('.') << 1.4 << endl;``
Last edited on
i have no idea what your even talking about... why do you have 1.4 in there?
The 1.4 is an example value. If you run that code the output is:

 1.4.................

From:
 ``12345678910`` ``````#include #include using std::cout; using std::endl; int main() { cout << std::setw(20) << std::left << std::setfill('.') << 1.4 << endl; return 0; }``````

Topic archived. No new replies allowed.