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