Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Hotel
- {
- class Hotel
- {
- static void Main(string[] args)
- {
- var month = Console.ReadLine();
- var nightsCount = double.Parse(Console.ReadLine());
- var studioPrize = 0.0;
- var doublePrize = 0.0;
- var suitePrize = 0.0;
- var nightsCountt = nightsCount;
- if ((month == "September" || month == "October") && nightsCount > 7)
- {
- nightsCountt--;
- }
- if (month == "May" || month == "October")
- {
- doublePrize = 65 * nightsCount;
- suitePrize = 75 * nightsCount;
- if (nightsCount > 7)
- {
- studioPrize = (50 * nightsCountt) * 0.95;
- }
- else
- {
- studioPrize = 50 * nightsCount;
- }
- }
- else if (month == "June" || month == "September")
- {
- studioPrize = 60 * nightsCountt;
- suitePrize = 82 * nightsCount;
- if (nightsCount > 14)
- {
- doublePrize = (72 * nightsCount) * 0.9;
- }
- else
- {
- doublePrize = 72 * nightsCount;
- }
- }
- else if (month == "July" || month == "August" || month == "December")
- {
- studioPrize = 68 * nightsCount;
- doublePrize = 77 * nightsCount;
- if (nightsCount > 14)
- {
- suitePrize = (89 * nightsCount) * 0.85;
- }
- else
- {
- suitePrize = 89 * nightsCount;
- }
- }
- Console.WriteLine($"Studio: {studioPrize:f2} lv.");
- Console.WriteLine($"Double: {doublePrize:f2} lv.");
- Console.WriteLine($"Suite: {suitePrize:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement