// Calculate the amount of sales tax. tax = purchase * SALESTAX; // Add the sales tax to the purchase amount. total = purchase + tax;