From bfc1c0e78f451376bb1bbef6efbbf5eece4741f2 Mon Sep 17 00:00:00 2001 From: Harshit Raj Date: Tue, 14 Apr 2026 13:50:27 +0000 Subject: [PATCH] Test --- Calculator/TaxLogic.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Calculator/TaxLogic.swift b/Calculator/TaxLogic.swift index d4c4bb8..4914f52 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) + let netIncome = income - taxAmount + return (taxAmount, netIncome) } \ No newline at end of file