1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
while ( salesman_ID >= 0 )
{
//readData is the function that is reading in the values from a file.
readData ( fin, salesman_ID, monthly_sales_figure, count );
//all the rest below are just functions for the mathematics portion.
calcCommission ( commission, monthly_sales_figure, COMMISSION_RATE,
TARGET_SALES_AMOUNT, met_goal );
calcBonus ( bonus, monthly_sales_figure, TARGET_SALES_AMOUNT,
BONUS_RATE );
calcEarnings ( total_earnings, commission, bonus );
printReport ( fout, salesman_ID, monthly_sales_figure,
commission, bonus, total_earnings, met_goal);
}
|