grach

2016_March_26 Trip

Dec 26th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.49 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 Trip
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var budget = double.Parse(Console.ReadLine());
  14.             string season = (Console.ReadLine());
  15.  
  16.             if (budget<=100)
  17.             {
  18.                 if (season=="summer")
  19.                 {
  20.                     Console.WriteLine("Somewhere in Bulgaria");
  21.                     Console.WriteLine("Camp - {0:f2}",budget*0.3 );
  22.                 }
  23.                 if (season=="winter")
  24.                 {
  25.                     Console.WriteLine("Somewhere in Bulgaria");
  26.                     Console.WriteLine("Hotel - {0:f2}", budget * 0.7);
  27.                 }
  28.             }
  29.  
  30.             else if (budget<=1000)
  31.             {
  32.                 if (season == "summer")
  33.                 {
  34.                     Console.WriteLine("Somewhere in Balkans");
  35.                     Console.WriteLine("Camp - {0:f2}", budget * 0.4);
  36.                 }
  37.                 if (season == "winter")
  38.                 {
  39.                     Console.WriteLine("Somewhere in Balkans");
  40.                     Console.WriteLine("Hotel - {0:f2}", budget * 0.8);
  41.                 }
  42.             }
  43.  
  44.             if (budget>1000)
  45.             {
  46.                 Console.WriteLine("Somewhere in Europe");
  47.                 Console.WriteLine("Hotel - {0:f2}", budget * 0.9);
  48.             }
  49.  
  50.         }
  51.     }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment