Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 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 ConsoleApp1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. //Input
  15. double days = double.Parse(Console.ReadLine());
  16. string destination = Console.ReadLine();
  17. string typeRoom = Console.ReadLine();
  18.  
  19. double TOTAL = 0;
  20.  
  21. //If-Statements
  22. if (destination == "Borovets")
  23. {
  24. if (typeRoom == "double")
  25. {
  26. TOTAL = 38 * days;
  27. }
  28. else if (typeRoom == "apartment")
  29. {
  30. TOTAL = 45 * days;
  31. }
  32. }
  33. else if (destination == "Bansko")
  34. {
  35. if (typeRoom == "double")
  36. {
  37. TOTAL = 35 * days;
  38. }
  39. else if (typeRoom == "apartment")
  40. {
  41. TOTAL = 42 * days;
  42. }
  43. }
  44. else if (destination == "Pamporovo")
  45. {
  46. if (typeRoom == "double")
  47. {
  48. TOTAL = 39 * days;
  49. }
  50. else if (typeRoom == "apartment")
  51. {
  52. TOTAL = 49 * days;
  53. }
  54. }
  55.  
  56. if (days > 10)
  57. {
  58. TOTAL = TOTAL * 0.85;
  59. }
  60.  
  61. Console.WriteLine($"They have to spend {TOTAL:F2} leva.");
  62.  
  63.  
  64. }
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement