Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Hotel_Room
- {
- class Program
- {
- static void Main(string[] args)
- {
- string month = Console.ReadLine();
- int numberOfTheNights = int.Parse(Console.ReadLine());
- double priceStudio = 0;
- double priceApartment = 0;
- if (month == "May" && month == "Octomber")
- {
- if (numberOfTheNights <= 7)
- {
- priceStudio = 50;
- priceApartment = 65;
- }
- else if (numberOfTheNights <= 14)
- {
- priceStudio = 50 * 0.95;
- priceApartment = 65;
- }
- else if (numberOfTheNights > 14)
- {
- priceStudio = 50 * 0.7;
- priceApartment = 65 * 0.9;
- }
- }
- else if (month == "June" && month == "September")
- {
- if (numberOfTheNights <= 14)
- {
- priceStudio = 75.20;
- priceApartment = 68.70;
- }
- else
- {
- priceStudio = 75.20 * 0.2;
- priceApartment = 68.70 * 0.9;
- }
- }
- else if (month == "Jule" && month == "August")
- {
- priceStudio = 76;
- if (numberOfTheNights <= 14)
- {
- priceApartment = 77;
- }
- else if (numberOfTheNights > 14)
- {
- priceApartment = 77 * 0.9;
- }
- }
- Console.WriteLine($"Apartment: {(numberOfTheNights*priceApartment):f2} lv.");
- Console.WriteLine($"Studio: {(numberOfTheNights*priceStudio):f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement