diff --git a/Calculator/TaxLogic.swift b/Calculator/TaxLogic.swift index d4c4bb8..6dab003 100644 --- a/Calculator/TaxLogic.swift +++ b/Calculator/TaxLogic.swift @@ -13,6 +13,7 @@ /// - Returns: A tuple with the calculated `taxAmount` and the resulting `netIncome`. import Foundation func calculateTax(income: Double, taxRate: Double) -> (taxAmount: Double, netIncome: Double) { - - return (0, 0) + let taxAmount = income * taxRate / 100.0 + let netIncome = income - taxAmount + return (taxAmount, netIncome) } \ No newline at end of file