Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2018
1,127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.05 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 Vacation_Trip
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             decimal budget = decimal.Parse(Console.ReadLine());
  14.             string season = Console.ReadLine().ToLower();
  15.             string destinationResult = string.Empty;
  16.             string holidayInformation = string.Empty;
  17.             decimal moneySpent = 0.00M;
  18.  
  19.             if (budget <= 100)
  20.             {
  21.                 destinationResult = "Bulgaria";
  22.                 moneySpent = 0.70M * budget;
  23.                 holidayInformation = string.Format($"Hotel - {moneySpent:F2}");
  24.                 if (season.Equals("summer"))
  25.                 {
  26.                     moneySpent = 0.30M * budget;
  27.                     holidayInformation = string.Format($"Camp - {moneySpent:F2}");
  28.                 }
  29.                 Console.WriteLine($"Somewhere in {destinationResult}");
  30.                 Console.WriteLine(holidayInformation);
  31.          
  32.             }
  33.             else if (budget <= 1000)
  34.             {
  35.                 destinationResult = "Balkans";
  36.                 moneySpent = 0.80M * budget;
  37.                 holidayInformation = string.Format($"Hotel - {moneySpent:F2}");
  38.                 if (season.Equals("summer"))
  39.                 {
  40.                     moneySpent = 0.40M * budget;
  41.                     holidayInformation = string.Format($"Camp - {moneySpent:F2}");
  42.                 }
  43.                 Console.WriteLine($"Somewhere in {destinationResult}");
  44.                 Console.WriteLine(holidayInformation);
  45.  
  46.             }
  47.             else
  48.             {
  49.                 destinationResult = "Europe";
  50.                 moneySpent = 0.90M * budget;
  51.                 holidayInformation = string.Format($"Hotel - {moneySpent:F2}");
  52.                 Console.WriteLine($"Somewhere in {destinationResult}");
  53.                 Console.WriteLine(holidayInformation);
  54.             }
  55.  
  56.            
  57.            
  58.  
  59.         }
  60.     }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement