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 _03.Vacation
- {
- class Program
- {
- static void Main(string[] args)
- {
- int peapleCount = int.Parse(Console.ReadLine());
- string typeOfCard = Console.ReadLine().ToLower();
- string dayOfWeak = Console.ReadLine().ToLower();
- double totalPrise = 1.00;
- if (typeOfCard == "students")
- {
- if (dayOfWeak == "friday")
- {
- totalPrise = peapleCount * 8.54;
- }
- else if (dayOfWeak == "saturday")
- {
- totalPrise = peapleCount * 9.80;
- }
- else
- {
- totalPrise = peapleCount * 10.46;
- }
- if (peapleCount >= 30)
- {
- totalPrise = totalPrise - (totalPrise * 0.15);
- }
- }
- else if (typeOfCard == "business")
- {
- if (dayOfWeak == "friday")
- {
- totalPrise = peapleCount * 10.90;
- }
- else if (dayOfWeak == "saturday")
- {
- totalPrise = peapleCount * 15.60;
- }
- else
- {
- totalPrise = peapleCount * 16;
- }
- if (peapleCount >= 100)
- {
- totalPrise = totalPrise - (totalPrise / 10);
- }
- }
- else
- {
- if (dayOfWeak == "friday")
- {
- totalPrise = peapleCount * 15;
- }
- else if (dayOfWeak == "saturday")
- {
- totalPrise = peapleCount * 20;
- }
- else
- {
- totalPrise = peapleCount * 22.50;
- }
- if (peapleCount <= 20 && peapleCount >= 20)
- {
- totalPrise = totalPrise - (totalPrise * 0.05);
- }
- }
- Console.WriteLine($"Total price: {totalPrise:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement