All pastes #399398 Raw Edit

Stuff

public text v1 · immutable
·published 2007-03-17 23:44 UTC
rendered paste body
for(int i=1; i<=items; i++) {

units = 0;
total, price = 0.0;
getline(Order, description, '\t');
Order >> units >> price;
        if((units > 0) && (price > 0.00)) {
             total = units*price;
             subtotal = subtotal + total;
             Invoice << left << setw(41) << description.c_str();
             Invoice << setprecision(2) << fixed << showpoint  << " " <<setw(10) << right << units << " " << setw(13) << right << total;
             totalUnits = totalUnits + units;
        }

        else {
             continue;
        }
}