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 _04.Hotel
- {
- class Program
- {
- static void Main(string[] args)
- {
- string month = Console.ReadLine().ToLower();
- int nights = int.Parse(Console.ReadLine());
- double priceStudio = 0.0;
- double studio = 0.0;
- double doubler = 0.0;
- double suite = 0.0;
- if (month == "may" || month == "october")
- {
- studio = 50;
- doubler = 65;
- suite = 75;
- if (nights > 7)
- {
- studio *= 0.95;
- }
- if (month == "october" && nights > 7)
- {
- priceStudio = (nights - 1) * studio;
- }
- }
- else if (month == "june" || month == "september")
- {
- studio = 60;
- doubler = 72;
- suite = 82;
- if (nights > 14)
- {
- doubler *= 0.9;
- }
- if (month == "september" && nights > 7)
- {
- priceStudio = (nights - 1) * studio;
- }
- }
- else if (month == "july" || month == "august" || month == "december")
- {
- studio = 68;
- doubler = 77;
- suite = 89;
- if (nights > 14)
- {
- suite *= 0.85;
- }
- }
- if (month == "september" || month == "october")
- {
- Console.WriteLine($"Studio: {priceStudio:F2} lv.");
- }
- else
- {
- Console.WriteLine($"Studio: {(studio * nights):F2} lv.");
- }
- Console.WriteLine($"Double: {(doubler * nights):F2} lv.");
- Console.WriteLine($"Suite: {(suite * nights):F2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement