Advertisement
Guest User

Untitled

a guest
Mar 4th, 2018
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.69 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 gsdsg
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string season = Console.ReadLine();
  14.             var kmpermonth = double.Parse(Console.ReadLine());
  15.  
  16.             if ((season == "Spring" || season == "Autumn") && kmpermonth <= 5000)
  17.             {
  18.                 double selary = kmpermonth * 0.75;
  19.                 double taxes = selary * 4 * 0.9;
  20.                 Console.WriteLine($"{taxes:f2}");
  21.             }
  22.             else if ((season == "Spring" || season == "Autumn") && kmpermonth > 5000 && kmpermonth <= 10000)
  23.             {
  24.                 double selary = kmpermonth * 0.95;
  25.                 double taxes = selary * 4 * 0.9;
  26.                 Console.WriteLine($"{taxes:f2}");
  27.             }
  28.             else if ((season == "Spring" || season == "Autumn") && kmpermonth <= 20000)
  29.             {
  30.                 double selary = kmpermonth * 1.45;
  31.                 double taxes = selary * 4 * 0.9;
  32.                 Console.WriteLine($"{taxes:f2}");
  33.             }
  34.             if (season == "Summer" && kmpermonth <= 5000)
  35.             {
  36.                 double selary = kmpermonth * 0.90;
  37.                 double taxes = selary * 4 * 0.9;
  38.                 Console.WriteLine($"{taxes:f2}");
  39.             }
  40.             else if (season == "Summer" && kmpermonth > 5000 && kmpermonth <= 10000)
  41.             {
  42.                 double selary = kmpermonth * 1.10;
  43.                 double taxes = selary * 4 * 0.9;
  44.                 Console.WriteLine($"{taxes:f2}");
  45.             }
  46.             else if (season == "Summer" && kmpermonth > 10000 && kmpermonth <= 20000)
  47.             {
  48.                 double selary = kmpermonth * 1.45;
  49.                 double taxes = selary * 4 * 0.9;
  50.                 Console.WriteLine($"{taxes:f2}");
  51.             }
  52.             else if (season == "Winter" && kmpermonth <= 5000)
  53.             {
  54.                 double selary = kmpermonth * 1.05;
  55.                 double taxes = selary * 4 * 0.9;
  56.                 Console.WriteLine($"{taxes:f2}");
  57.             }
  58.             else if (season == "Winter" && kmpermonth > 5000 && kmpermonth <= 10000)
  59.             {
  60.                 double selary = kmpermonth * 1.25;
  61.                 double taxes = selary * 4 * 0.9;
  62.                 Console.WriteLine($"{taxes:f2}");
  63.             }
  64.             else if (season == "Winter" && kmpermonth > 10000 && kmpermonth <= 20000)
  65.             {
  66.                 double selary = kmpermonth * 1.45;
  67.                 double taxes = selary * 4 * 0.9;
  68.                 Console.WriteLine($"{taxes:f2}");
  69.             }
  70.         }
  71.     }
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement