I have this code that prints out an amount of money, but sometimes if the amount comes out to a multiple of 10 cents, like $22.50 or $189.20, the UI will chop off the last 0 to show $22.5 or $189.2?
@IBAction func btnCalPress(sender: AnyObject) {
let tipPer = Double(PercentTip.text!)! / 100
let billAmt = Double(BillAmount.text!)
let salesTax = Double(SalesTax.text!)! / 100
let tipAmt = Double(billAmt! * tipPer)
let taxAmt = Double(billAmt! * salesTax)
let totalAmt = tipAmt + taxAmt + billAmt!
let tipAmountFormat = round(tipAmt * 100) / 100
let taxAmountFormat = round(taxAmt * 100) / 100
let totalPayFormat = round(totalAmt * 100) / 100
TipAmount.text = "Tip: $\(tipAmountFormat)"
TaxAmount.text = "Tax: $\(taxAmountFormat)"
TotalAmount.text = "Total: $\(totalPayFormat)"
}