IvetValcheva

05. Journey

Nov 15th, 2021
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp2
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double budget = double.Parse(Console.ReadLine());
  10.             string season = Console.ReadLine();
  11.  
  12.             string destination = "Europe";
  13.             string type = "Hotel";
  14.             double price = budget*0.9;
  15.  
  16.             if (budget <= 100)
  17.             {
  18.                 destination = "Bulgaria";
  19.                 price = budget * 0.7;
  20.  
  21.                 if (season== "summer")
  22.                 {
  23.                     type = "Camp";
  24.                     price = budget * 0.3;
  25.                 }
  26.                
  27.             }
  28.             else if (budget <= 1000)
  29.             {
  30.                 destination = "Balkans";
  31.                 price = budget * 0.8;
  32.  
  33.                 if (season == "summer")
  34.                 {
  35.                     type = "Camp";
  36.                     price = budget * 0.4;
  37.                 }
  38.             }
  39.            
  40.             Console.WriteLine($"Somewhere in {destination}");
  41.             Console.WriteLine($"{type} - {price:F2}");
  42.         }
  43.     }
  44. }
  45.  
Advertisement
Add Comment
Please, Sign In to add comment