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 mount = Console.ReadLine();
- int nights = int.Parse(Console.ReadLine());
- double price = 00.00;
- double TotalPrice = 0.00;
- string type = "";
- if (mount == "May" || mount == "October" && type == "Apartment")
- {
- if (nights > 14)
- {
- price = 65.00;
- TotalPrice = (price * nights) * 0.90;
- }
- Console.WriteLine($"Apartment: {TotalPrice:F2} lv.");
- }
- if (mount == "May"|| mount == "October" && type == "Studio")
- {
- if (nights > 7 && nights <= 14)
- {
- price = 50.00;
- TotalPrice = (price * nights) * 0.95;
- }
- if (nights > 14)
- {
- price = 50.00;
- TotalPrice = (price * nights) * 0.70;
- }
- Console.WriteLine($"Studio: {TotalPrice:F2} lv.");
- }
- if (mount == "August" || mount == "July" && type == "Apartment")
- {
- price = 77.00;
- TotalPrice = price * nights;
- if (nights > 14)
- {
- price = 77.00;
- TotalPrice = (price * nights) * 0.90;
- }
- Console.WriteLine($"Apartment: {TotalPrice:F2} lv.");
- if (mount == "August" || mount == "July" && type == "Apartment")
- {
- price = 76.00;
- TotalPrice = (price * nights);
- Console.WriteLine($"Studio: {TotalPrice:F2} lv.");
- }
- }
- if (mount == "June" || mount == "September" && type == "Apartment")
- {
- price = 68.70;
- TotalPrice = price * nights;
- if (nights > 14)
- {
- price = 68.70;
- TotalPrice = (price * nights) * 0.90;
- }
- Console.WriteLine($"Apartment: {TotalPrice:F2} lv.");
- if (mount == "June" || mount == "September" && type == "Studio")
- {
- price = 75.20;
- TotalPrice = (price * nights);
- if (nights > 14)
- {
- price = 75.20;
- TotalPrice = (price * nights) * 0.80;
- }
- Console.WriteLine($"Studio: {TotalPrice:F2} lv.");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement