Advertisement
KirillKorobka

Untitled

Nov 16th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. Console.OutputEncoding = Encoding.UTF8;
  2. //Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
  3. Console.WriteLine("Enter income:");
  4. double income = double.Parse(Console.ReadLine());
  5. if (income < 6310)
  6. {
  7. double tax = income * 0.10;
  8. Console.WriteLine(tax.ToString("C2"));
  9. }
  10. else if (income > 6310 && income < 9050)
  11. {
  12. double tax = income * 0.14;
  13. Console.WriteLine(tax.ToString("C2"));
  14. }
  15. else if (income > 9050 && income < 14530)
  16. {
  17. double tax = income * 0.20;
  18. Console.WriteLine(tax.ToString("C2"));
  19. }
  20. else if (income > 14530 && income < 20200)
  21. {
  22. double tax = income * 0.31;
  23. Console.WriteLine(tax.ToString("C2"));
  24. }
  25. else if (income > 20200 && income < 42030 )
  26. {
  27. double tax = income * 0.35;
  28. Console.WriteLine(tax.ToString("C2"));
  29. }
  30. else if (income > 42030)
  31. {
  32. double tax = income * 0.47;
  33. Console.WriteLine(tax.ToString("C2"));
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement