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.Globalization;
- using System.Numerics;
- namespace Practice
- {
- class Program
- {
- static void Main()
- {
- int peopleCount = int.Parse(Console.ReadLine());
- string peopleType = Console.ReadLine();
- string dayType = Console.ReadLine();
- double students = 0;
- double business = 0;
- double regular = 0;
- if (dayType == "Monday")
- {
- students = 9.5;
- business = 11.80;
- regular = 15;
- }
- else if (dayType == "Tuesday")
- {
- students = 8;
- business = 14.50;
- regular = 15;
- }
- else if (dayType == "Wednesday")
- {
- students = 6.85;
- business = 12.60;
- regular = 14.80;
- }
- else if (dayType == "Thursday")
- {
- students = 7.15;
- business = 13.20;
- regular = 13.90;
- }
- else if (dayType == "Friday")
- {
- students = 8.45;
- business = 10.90;
- regular = 15;
- }
- else if (dayType == "Saturday")
- {
- students = 9.80;
- business = 15.60;
- regular = 20;
- }
- else if (dayType == "Sunday")
- {
- students = 10.46;
- business = 16;
- regular = 22.50;
- }
- if (peopleCount >= 30)
- {
- students *= 0.85;
- }
- if (peopleCount >= 100)
- {
- peopleCount -= 10;
- }
- if (peopleCount >= 10 && peopleCount <= 20)
- {
- regular *= 0.95;
- }
- students *= peopleCount;
- business *= peopleCount;
- regular *= peopleCount;
- if (peopleType == "Students")
- {
- Console.WriteLine("Total price: {0:f2}", students);
- }
- else if (peopleType == "Business")
- {
- Console.WriteLine("Total price: {0:f2}", business);
- }
- else
- {
- Console.WriteLine("Total price: {0:f2}", regular);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement