Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
tax cal
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { const int topRateThreshold = 1000000; const int higherRateThreshold = 500000; const int basicRateThreshold = 250000; const decimal topRateFactor = 0.30M; const decimal higherRateFactor = 0.20M; const decimal basicRateFactor = 0.05M; decimal salaryWorkingRange = 1800000; decimal taxDue = 0; if (salaryWorkingRange > topRateThreshold) { Console.WriteLine("top Tax "+(salaryWorkingRange - topRateThreshold) * topRateFactor); taxDue += (salaryWorkingRange - topRateThreshold) * topRateFactor; salaryWorkingRange = topRateThreshold; } if (salaryWorkingRange > higherRateThreshold) { Console.WriteLine("middle Tax "+(salaryWorkingRange - higherRateThreshold) * higherRateFactor); taxDue += (salaryWorkingRange - higherRateThreshold) * higherRateFactor; salaryWorkingRange = higherRateThreshold; } if (salaryWorkingRange > basicRateThreshold) { Console.WriteLine("last Tax "+(salaryWorkingRange - basicRateThreshold) * basicRateFactor); taxDue += (salaryWorkingRange - basicRateThreshold) * basicRateFactor; } Console.WriteLine("Total Tax "+taxDue+" Tax per month "+taxDue/12); } } }
run
|
edit
|
history
|
help
0
fuck this
practice program
Ki
23
K
asd
Print("This is a Test")
Клас cstatic
Tree Node Sample
DotnetQ7