Advertisement
MARINA_GREBENAROVA

Journey

Sep 29th, 2021
956
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.47 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Journey
  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 = "";
  13.             string type = "";
  14.  
  15.             double price = 0;
  16.  
  17.             if (budget <= 100)
  18.             {
  19.                 destination = "Bulgaria";
  20.  
  21.                 if (season == "summer")
  22.                 {
  23.                     price = budget * 0.3;
  24.                     type = "Camp";
  25.                 }
  26.                 else if (season == "winter")
  27.                 {
  28.                     price = budget * 0.7;
  29.                     type = "Hotel";
  30.                 }
  31.             }
  32.             else if (budget <= 1000)
  33.             {
  34.                 destination = "Balkans";
  35.  
  36.                 if (season == "summer")
  37.                 {
  38.                     price = budget * 0.4;
  39.                     type = "Camp";
  40.                 }
  41.                 else if (season == "winter")
  42.                 {
  43.                     price = budget * 0.8;
  44.                     type = "Hotel";
  45.                 }
  46.             }
  47.             else
  48.             {
  49.                 destination = "Europe";
  50.  
  51.                 price = budget * 0.9;
  52.                 type = "Hotel";
  53.  
  54.             }
  55.             Console.WriteLine($"Somewhere in {destination}");
  56.             Console.WriteLine($"{type} - {price:F2}");
  57.  
  58.         }
  59.     }
  60. }
  61.  
  62.  
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement