IordanRujinov

Taxation

Jul 12th, 2020
1,575
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.09 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace TaxationCalc
  8. {
  9.     class TaxationCalc
  10.     {
  11.         static void Main()
  12.         {
  13.             double GrossValue = double.Parse(Console.ReadLine());
  14.             double IncomeTax = 0.1;
  15.             double SocialContr = 0.15;
  16.             double sumIncome = (GrossValue - 1000) * IncomeTax;
  17.             double sumSocial = (GrossValue - 1000) * SocialContr;
  18.             double TaxAfterMath = 300;
  19.  
  20.  
  21.             if (GrossValue > 1000 && GrossValue <= 3000)
  22.             {
  23.                 Console.WriteLine("The Value after tax is {0} IDR", (GrossValue - (sumIncome + sumSocial)));
  24.             }
  25.  
  26.             if (GrossValue > 3000)
  27.             {
  28.                 Console.WriteLine("The Value after tax is {0} IDR", (GrossValue - (sumIncome + TaxAfterMath)));
  29.             }
  30.  
  31.             if (GrossValue <= 1000)
  32.             {
  33.                 Console.WriteLine("The GrossValue is less or equal to 1000 and no taxation applies");
  34.             }
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment