Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace ConsoleApp3
- {
- class Program
- {
- static void Main(string[] args)
- {
- int people = int.Parse(Console.ReadLine());
- String kind = Console.ReadLine();
- String day = Console.ReadLine();
- decimal price = 0;
- if (day == "Friday" && kind == "Students")
- {
- price = people * 8.45M;
- }
- else if (day == "Friday" && kind == "Business")
- {
- price = people * 10.90M;
- }
- else if (day == "Friday" && kind == "Regular")
- {
- price = people * 15;
- }
- else if (day == "Saturday" && kind == "Students")
- {
- price = people * 9.80M;
- }
- else if (day == "Saturday" && kind == "Business")
- {
- price = people * 15.60M;
- }
- else if (day == "Saturday" && kind == "Regular")
- {
- price = people * 20.00M;
- }
- else if (day == "Sunday" && kind == "Students")
- {
- price = people * 10.46M;
- }
- else if (day == "Sunday" && kind == "Business")
- {
- price = people * 16.00M;
- }
- else if (day == "Sunday" && kind == "Regular")
- {
- price = people * 22.50M;
- }
- if (people >= 30 && kind == "Students")
- {
- price = price - 0.15M * price;
- }
- else if (people >= 100 && kind == "Business")
- {
- price = price - (price / people * 10);
- }
- else if (people >= 10 && people <= 20 && kind == "Regular")
- {
- price = price - 0.05M * price;
- }
- Console.WriteLine($"Total price: {price:F2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement