Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 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 _3rd_ex
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string destination = Console.ReadLine();
  14. string dates = (Console.ReadLine());
  15. int nights = int.Parse(Console.ReadLine());
  16. int priceForNight = 0;
  17. double totalPrice = 0;
  18. if (destination == "France")
  19. {
  20. if (dates == "21-23")
  21. {
  22. priceForNight = 30;
  23. totalPrice = priceForNight * nights;
  24.  
  25. }
  26. if (dates == "24 - 27")
  27. {
  28. priceForNight = 35;
  29. totalPrice = priceForNight * nights;
  30.  
  31. }
  32. if (dates == "28 - 31")
  33. {
  34. priceForNight = 40;
  35. totalPrice = priceForNight * nights;
  36.  
  37. }
  38.  
  39.  
  40. }
  41. else if (destination == "Italy")
  42. {
  43. if (dates == "21-23")
  44. {
  45. priceForNight = 28;
  46. totalPrice = priceForNight * nights;
  47. }
  48. else if (dates == "24-27")
  49. {
  50. priceForNight = 32;
  51. totalPrice = priceForNight * nights;
  52.  
  53. }
  54. else if (dates == "28 - 31")
  55. {
  56. priceForNight = 39;
  57. totalPrice = priceForNight * nights;
  58. }
  59. }
  60. if (destination == "Germany")
  61. {
  62. if (dates == "21-23")
  63. {
  64. priceForNight = 32;
  65. totalPrice = priceForNight * nights;
  66. }
  67. else if (dates == "24 - 27")
  68. {
  69. priceForNight = 37;
  70. totalPrice = priceForNight * nights;
  71. }
  72. if (dates == "28 - 31")
  73. {
  74. priceForNight = 43;
  75. totalPrice = priceForNight * nights;
  76. }
  77.  
  78. }
  79. Console.WriteLine("Easter trip to {0} : {1:F2} leva.", destination, totalPrice);
  80.  
  81. }
  82. }
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement