Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace hotelRoom
- {
- class Program
- {
- static void Main(string[] args)
- {
- string month = Console.ReadLine();
- double stay = double.Parse(Console.ReadLine());
- double studio = 0;
- double apartment = 0;
- switch (month)
- {
- case "May || October":
- if (stay > 7)
- {
- studio = 50 * 0.95;
- }
- if (stay >= 14)
- {
- studio = 50 * 0.70;
- apartment = 65 * 0.90;
- }
- if (stay < 7)
- {
- studio = 50;
- apartment = 65;
- }
- break;
- case "June || September":
- if (stay >= 14)
- {
- studio = 75.20 * 0.80;
- apartment = 68.70 * 0.90;
- }
- if (stay < 14)
- {
- studio = 75.20;
- apartment = 68.70;
- }
- break;
- case "July || August":
- if (stay >= 14)
- {
- studio = 76;
- apartment = 77 * 0.90;
- }
- if (stay < 7)
- {
- studio = 76;
- apartment = 77;
- }
- break;
- }
- Console.WriteLine($"Apartment: {apartment * stay:F2}lv.");
- Console.WriteLine($"Studio: {studio * stay:F2}lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement