Advertisement
tsvetelinapasheva

TsvetelinaPasheva/ConditionalStatementsAdvancedExercise/05.Journey

Jan 30th, 2021
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.40 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp7
  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.             if (budget <= 100)
  13.             {
  14.                 Console.WriteLine("Somewhere in Bulgaria");
  15.                 if (season == "summer")
  16.                 {
  17.                     Console.WriteLine($"Camp - {budget * 0.30:f2}");
  18.                 }
  19.                 else if (season == "winter")
  20.                 {
  21.                     Console.WriteLine($"Hotel - {budget * 0.70:f2}");
  22.                 }
  23.             }
  24.             else if (budget <= 1000)
  25.             {
  26.                 Console.WriteLine("Somewhere in Balkans");
  27.                 if (season == "summer")
  28.                 {
  29.                     Console.WriteLine($"Camp - {budget * 0.40:f2}");
  30.                 }
  31.                 if (season == "winter")
  32.                 {
  33.                     Console.WriteLine($"Hotel - {budget * 0.80:f2}");
  34.                 }
  35.             }
  36.             else if (budget > 1000)
  37.             {
  38.                 Console.WriteLine("Somewhere in Europe");
  39.                 if (season == "summer" || season == "winter")
  40.                 {
  41.                     Console.WriteLine($"Hotel - {budget * 0.90:f2}");
  42.                 }
  43.             }
  44.            
  45.            
  46.         }
  47.     }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement