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