Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace exampreparation
- {
- class Program
- {
- static void Main(string[] args)
- {
- string city = Console.ReadLine();
- string packet = Console.ReadLine();
- string vip = Console.ReadLine();
- int days = int.Parse(Console.ReadLine());
- if (days < 1)
- {
- Console.WriteLine("Days must be positive number!");
- return;
- }
- if (days > 7)
- {
- days--;
- }
- double price = 0.0;
- if (city == "Bansko" || city == "Borovets")
- {
- if (packet == "withEquipment")
- {
- price = 100.0;
- if (vip == "yes")
- {
- price *= 0.90;
- }
- }
- else if(packet == "noEquipment")
- {
- price = 80.0;
- if (vip == "yes")
- {
- price *= 0.95;
- }
- }
- else
- {
- Console.WriteLine("Invalid input!");
- return;
- }
- }
- else if (city == "Varna" || city == "Burgas")
- {
- if (packet == "withBreakfast")
- {
- price = 130.0;
- if (vip == "yes")
- {
- price *= 0.88;
- }
- }
- else if(packet == "noBreakfast")
- {
- price = 100.0;
- if (vip == "yes")
- {
- price *= 0.93;
- }
- }
- else
- {
- Console.WriteLine("Invalid input!");
- return;
- }
- }
- else
- {
- Console.WriteLine("Invalid input!");
- return;
- }
- double fullSum = days * price;
- Console.WriteLine($"The price is {fullSum:f2}lv! Have a nice time!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement