Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace TheatrePromotion1
- {
- class Program
- {
- static void Main(string[] args)
- {
- string typeOfDay = Console.ReadLine();
- int age = int.Parse(Console.ReadLine());
- if (typeOfDay == "Weekday")
- {
- if (age >= 0 && age <= 18)
- {
- Console.WriteLine("12$");
- }
- else if (age > 18 && age <= 64)
- {
- Console.WriteLine("18$");
- }
- else if (age > 64 && age <= 122)
- {
- Console.WriteLine("12$");
- }
- }
- else if (typeOfDay == "Weekend")
- {
- if (age >= 0 && age <= 18)
- {
- Console.WriteLine("15$");
- }
- else if (age > 18 && age <= 64)
- {
- Console.WriteLine("20$");
- }
- else if (age > 64 && age <= 122)
- {
- Console.WriteLine("15$");
- }
- }
- else if (typeOfDay == "Holiday")
- {
- if (age >= 0 && age <= 18)
- {
- Console.WriteLine("5$");
- }
- else if (age > 18 && age <= 64)
- {
- Console.WriteLine("12$");
- }
- else if (age > 64 && age <= 122)
- {
- Console.WriteLine("10$");
- }
- }
- else
- {
- Console.WriteLine("Error!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement