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