#!/usr/bin/env swift; /****************************************************************************** * This program computes the combined FICA taxes with formatted output. * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ import Foundation import Utils let ficaRate:Double = 0.0765 let grossPay:Double = 1000 func main() -> Void { var ficaTax:Double = grossPay * ficaRate var netPay:Double = grossPay - ficaTax print(Utils.format("Gross Pay: {0:.2f}", grossPay)) print(Utils.format("FICA Tax: {0:.2f}", ficaTax)) print(Utils.format("Net Pay: {0:.2f}", netPay)) exit(EXIT_SUCCESS) } main()