Advertisement
Guest User

Vacation

a guest
Mar 15th, 2017
1,317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 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
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int purvi = int.Parse(Console.ReadLine());
  14. int vtori = int.Parse(Console.ReadLine());
  15. int treti = int.Parse(Console.ReadLine());
  16. string chetvurti = Console.ReadLine();
  17.  
  18.  
  19.  
  20. if (chetvurti == "train" && purvi + vtori >= 50)
  21. {
  22. double Train = (purvi * 24.99) / 2 + (vtori * 14.99) / 2;
  23. Train = Train * 2;
  24. double hotel = (treti * 82.99);
  25. double komisionna = (Train + hotel) * 0.10;
  26. double suma = Train + hotel + komisionna;
  27. Console.WriteLine("{0:f2}", suma);
  28. }
  29. else if (chetvurti == "train")
  30. {
  31. double Train = (purvi * 24.99) + (vtori * 14.99);
  32. Train = Train * 2;
  33. double hotel = (treti * 82.99);
  34. double komisionna = (Train + hotel) * 0.10;
  35. double suma = Train + hotel + komisionna;
  36. Console.WriteLine("{0:f2}", suma);
  37. }
  38. else if (chetvurti == "bus")
  39. {
  40. double Bus = (purvi * 32.50) + (vtori * 28.50);
  41. Bus = Bus * 2;
  42. double BusHotel = (treti * 82.99);
  43. double komisionnaBus = (Bus + BusHotel) * 0.10;
  44. double sumaBus = Bus + BusHotel + komisionnaBus;
  45. Console.WriteLine("{0:f2}", sumaBus);
  46. }
  47. else if (chetvurti == "boat")
  48. {
  49. double Boat = (purvi * 42.99) + (vtori * 39.99);
  50. Boat = Boat * 2;
  51. double BoatHotel = (treti * 82.99);
  52. double komisionnaBoat = (Boat + BoatHotel) * 0.10;
  53. double sumaBoat = Boat + BoatHotel + komisionnaBoat;
  54. Console.WriteLine("{0:f2}", sumaBoat);
  55. }
  56. else if (chetvurti == "airplane")
  57. {
  58. double airplane = (purvi * 70.00) + (vtori * 50.00);
  59. airplane = airplane * 2;
  60. double AirpalneHotel = (treti * 82.99);
  61. double komisionnaAirplane = (airplane + AirpalneHotel) * 0.10;
  62. double sumaAirplane = airplane + AirpalneHotel + komisionnaAirplane;
  63. Console.WriteLine("{0:f2}", sumaAirplane);
  64. }
  65. }
  66. }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement