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 ConsoleApp22
- {
- class Program
- {
- static void Main(string[] args)
- {
- double groupOfPeaope = double.Parse(Console.ReadLine());
- string typeOfGroup = Console.ReadLine();
- string day = Console.ReadLine();
- double price = 0;
- if (typeOfGroup == "Students")
- {
- if (day == "Friday")
- {
- price = groupOfPeaope * 8.45;
- }
- else if (day == "Saturday")
- {
- price = groupOfPeaope * 9.80;
- }
- else if (day == "Sunday")
- {
- price = groupOfPeaope * 10.46;
- }
- if (groupOfPeaope >= 30)
- {
- price = price * 0.85;
- }
- }
- else if (typeOfGroup == "Business")
- {
- if (groupOfPeaope >= 100)
- {
- groupOfPeaope -= 10;
- }
- if (day == "Friday")
- {
- price = groupOfPeaope * 10.90;
- }
- else if (day == "Saturday")
- {
- price = groupOfPeaope * 15.60;
- }
- else if (day == "Sunday")
- {
- price = groupOfPeaope * 16;
- }
- }
- else if (typeOfGroup == "Regular")
- {
- if (day == "Friday")
- {
- price = groupOfPeaope * 15;
- }
- else if (day == "Saturday")
- {
- price = groupOfPeaope * 20;
- }
- else if (day == "Sunday")
- {
- price = groupOfPeaope * 22.50;
- }
- if (groupOfPeaope >= 10 && groupOfPeaope <= 20)
- {
- price -= price * 0.95;
- }
- }
- Console.WriteLine($"Total price: {price:F2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement