Advertisement
Guest User

Untitled

a guest
May 29th, 2017
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 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 TheatrePromotion1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string typeOfDay = Console.ReadLine();
  14. int age = int.Parse(Console.ReadLine());
  15.  
  16. if (typeOfDay == "Weekday")
  17. {
  18. if (age >= 0 && age <= 18)
  19. {
  20. Console.WriteLine("12$");
  21. }
  22. else if (age > 18 && age <= 64)
  23. {
  24. Console.WriteLine("18$");
  25. }
  26. else if (age > 64 && age <= 122)
  27. {
  28. Console.WriteLine("12$");
  29. }
  30. }
  31. else if (typeOfDay == "Weekend")
  32. {
  33. if (age >= 0 && age <= 18)
  34. {
  35. Console.WriteLine("15$");
  36. }
  37. else if (age > 18 && age <= 64)
  38. {
  39. Console.WriteLine("20$");
  40. }
  41. else if (age > 64 && age <= 122)
  42. {
  43. Console.WriteLine("15$");
  44. }
  45. }
  46. else if (typeOfDay == "Holiday")
  47. {
  48. if (age >= 0 && age <= 18)
  49. {
  50. Console.WriteLine("5$");
  51. }
  52. else if (age > 18 && age <= 64)
  53. {
  54. Console.WriteLine("12$");
  55. }
  56. else if (age > 64 && age <= 122)
  57. {
  58. Console.WriteLine("10$");
  59. }
  60. }
  61. else
  62. {
  63. Console.WriteLine("Error!");
  64. }
  65. }
  66. }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement