Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Calculator/TaxLogic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
/// - income: Gross income in ₹.
/// - taxRate: Applicable tax rate as a percentage (e.g., pass 20 for 20 %).
/// - 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)
}
Loading