Advertisement
EmoRz

Trip

Jul 5th, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.04 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Trip
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double budget = double.Parse(Console.ReadLine());
  10.             string season = Console.ReadLine().ToLower();
  11.             var calculation = 0.0;
  12.             string camp = "Camp";
  13.             string hotel = "Hotel";
  14.  
  15.  
  16.             if (season=="summer")
  17.             {
  18.                 if (budget>1000)
  19.                 {
  20.                     calculation = budget * 0.9;
  21.                     Console.WriteLine($"Somewhere in Europe");
  22.                     Console.WriteLine($"{hotel} - {calculation:f2}");
  23.                 }
  24.                 if (budget <= 1000&&budget>100)
  25.                 {
  26.                     calculation = budget * 0.4;
  27.                     Console.WriteLine($"Somewhere in Balkans");
  28.                     Console.WriteLine($"{camp} - {calculation:f2}");
  29.                 }
  30.                 if (budget <= 100)
  31.                 {
  32.                     calculation = budget * 0.3;
  33.                     Console.WriteLine($"Somewhere in Bulgaria");
  34.                     Console.WriteLine($"{camp} - {calculation:f2}");
  35.                 }
  36.  
  37.             }
  38.             else if (season == "winter")
  39.             {
  40.                 if (budget > 1000)
  41.                 {
  42.                     calculation = budget * 0.9;
  43.                     Console.WriteLine($"Somewhere in Europe");
  44.                     Console.WriteLine($"{hotel} - {calculation:f2}");
  45.                 }
  46.                 if (budget <= 1000 && budget > 100)
  47.                 {
  48.                     calculation = budget * 0.8;
  49.                     Console.WriteLine($"Somewhere in Balkans");
  50.                     Console.WriteLine($"{hotel} - {calculation:f2}");
  51.                 }
  52.                 if (budget <= 100)
  53.                 {
  54.                     calculation = budget * 0.7;
  55.                     Console.WriteLine($"Somewhere in Bulgaria");
  56.                     Console.WriteLine($"{hotel} - {calculation:f2}");
  57.                 }
  58.             }
  59.         }
  60.     }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement