MiroslavKisov

Travel

Jul 25th, 2017
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.16 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 Travel
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double budget = double.Parse(Console.ReadLine());
  14.             string season = Console.ReadLine();
  15.             //budget<=100(Bulgaria)
  16.             if(budget<=100.0)
  17.             {
  18.                 if (season == "summer")
  19.                 {
  20.                     double cost = budget * 0.30;
  21.                     Console.WriteLine("Somewhere in Bulgaria");
  22.                     Console.WriteLine("Camp - {0:f2}",cost);
  23.                 }
  24.                 else if(season=="winter")
  25.                 {
  26.                     double cost = budget * 0.70;
  27.                     Console.WriteLine("Somewhere in Bulgaria");
  28.                     Console.WriteLine("Hotel - {0:f2}", cost);
  29.                 }
  30.             }
  31.             //budget>100 && budget<=100
  32.             if (budget > 100.0&&budget<=1000)
  33.             {
  34.                 if (season == "summer")
  35.                 {
  36.                     double cost = budget * 0.40;
  37.                     Console.WriteLine("Somewhere in Balkans");
  38.                     Console.WriteLine("Camp - {0:f2}", cost);
  39.                 }
  40.                 else if (season == "winter")
  41.                 {
  42.                     double cost = budget * 0.80;
  43.                     Console.WriteLine("Somewhere in Balkans");
  44.                     Console.WriteLine("Hotel - {0:f2}", cost);
  45.                 }
  46.             }
  47.             //budget>1000
  48.             if (budget > 1000.0)
  49.             {
  50.                 if (season == "summer")
  51.                 {
  52.                     double cost = budget * 0.90;
  53.                     Console.WriteLine("Somewhere in Europe");
  54.                     Console.WriteLine("Hotel - {0:f2}", cost);
  55.                 }
  56.                 else if (season == "winter")
  57.                 {
  58.                     double cost = budget * 0.90;
  59.                     Console.WriteLine("Somewhere in Europe");
  60.                     Console.WriteLine("Hotel - {0:f2}", cost);
  61.                 }
  62.             }
  63.         }
  64.     }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment