Krasimir_Slavov

Journey

Oct 3rd, 2018
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.28 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 Journey
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int budget = int.Parse(Console.ReadLine());
  14.             string season = Console.ReadLine();
  15.             double money = 0;
  16.  
  17.             switch (season)
  18.             {
  19.                 case "Bulgaria":
  20.                     {
  21.                         if (budget <= 100 && season == "summer")
  22.                         {
  23.                             money = budget * 0.30;
  24.                             Console.WriteLine($"Somewhere in Bulgaria");
  25.                             Console.WriteLine($"Camp - {money:F2}");
  26.                         }
  27.                         else if (budget <= 100 && season == "winter")
  28.                         {
  29.                             money = budget * 0.70;
  30.                             Console.WriteLine($"Somewhere in Bulgaria");
  31.                             Console.WriteLine($"Hotel - {money:F2}");
  32.                         }
  33.                     }
  34.                     break;
  35.                 case "Balkans":
  36.                     {
  37.                         if (budget <= 1000 && season == "summer")
  38.                         {
  39.                             money = budget * 0.40;
  40.                             Console.WriteLine($"Somewhere in Balkans");
  41.                             Console.WriteLine($"Camp - {money:F2}");
  42.                         }
  43.                         else if (budget <= 1000 && season == "winter")
  44.                         {
  45.                             money = budget * 0.80;
  46.                             Console.WriteLine($"Somewhere in Balkans");
  47.                             Console.WriteLine($"Hotel - {money:F2}");
  48.                         }
  49.                     }
  50.                     break;
  51.                 case "Europe":
  52.                     {
  53.                         if (budget > 100)
  54.                         {
  55.                             money = budget * 0.90;
  56.                             Console.WriteLine($"Somewhere in Europe");
  57.                             Console.WriteLine($"Hotel - {money:F2}");
  58.                         }
  59.                     }
  60.                     break;
  61.             }
  62.         }
  63.     }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment