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 Mounth = Console.ReadLine();
- double CountNigth = double.Parse(Console.ReadLine());
- double priceA = 0;
- double priceS = 0;
- if (Mounth == "May" || Mounth == "October")
- {
- if (CountNigth > 7 && CountNigth <= 14)
- {
- priceA = 65 * CountNigth;
- priceS = 50 * CountNigth - (50 * CountNigth * 5 / 100);
- }
- else if (CountNigth > 14)
- {
- priceA = 65 * CountNigth - (65 * CountNigth * 10 / 100);
- priceS = 50 * CountNigth - (50 * CountNigth * 30 / 100);
- }
- else
- {
- priceA = 65 * CountNigth;
- priceS = 50 * CountNigth;
- }
- }
- else if (Mounth == "June" || Mounth == "September")
- {
- if (CountNigth > 14)
- {
- priceA = 68.7 * CountNigth - (68.7 * CountNigth * 10 / 100);
- priceS = 75.2 * CountNigth - (75.2 * CountNigth * 20 / 100);
- }
- else
- {
- priceA = 68.7 * CountNigth;
- priceS = 75.2 * CountNigth;
- }
- }
- else if (Mounth == "July" || Mounth == "August")
- {
- if (CountNigth > 14)
- {
- priceA = 77 * CountNigth - (77 * CountNigth * 10 / 100);
- priceS = 76 * CountNigth;
- }
- else
- {
- priceA = 77 * CountNigth;
- priceS = 76 * CountNigth;
- }
- }
- Console.WriteLine($"Apartment: {priceA:f2} lv.");
- Console.WriteLine($"Studio: {priceS:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment