daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jan 29th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace ConsoleApp19
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string month = Console.ReadLine();
  10.             int nights = int.Parse(Console.ReadLine());
  11.  
  12.             double studio = 0;
  13.             double doubleStudio = 0;
  14.             double masterSuite = 0;
  15.  
  16.             switch (month)
  17.             {
  18.                 case "May":
  19.                 case "October":
  20.                     studio = 50 * nights;
  21.                     doubleStudio = 65 * nights;
  22.                     masterSuite = 75 * nights;
  23.                     if (nights > 7)
  24.                     {
  25.                         studio = 50 * 0.95 * nights;
  26.  
  27.                     }
  28.                     if (nights > 7 && month == "October")
  29.                     {
  30.                         studio = (50 * 0.95 * nights) - (50 * 0.95) ;
  31.                     }
  32.                     break;
  33.                 case "June":
  34.                 case "September":
  35.                     studio = 60 * nights;
  36.                     doubleStudio = 72 * nights;
  37.                     masterSuite = 82 * nights;
  38.                     if (nights > 7 && month == "September")
  39.                     {
  40.                         studio = 60 * nights - 60;
  41.                     }
  42.                     if (nights > 14)
  43.                     {
  44.                         doubleStudio = 72 * 0.9 * nights;
  45.                     }
  46.                     break;
  47.                 case "July":
  48.                 case "August":
  49.                 case "December":
  50.                     studio = 68 * nights;
  51.                     doubleStudio = 77 * nights;
  52.                     masterSuite = 89 * nights;
  53.                     if (masterSuite > 14)
  54.                     {
  55.                         masterSuite = 89 * 0.85 * nights;
  56.                     }
  57.                     break;
  58.  
  59.             }
  60.             Console.WriteLine("Studio: {0:f2} lv.", studio);
  61.             Console.WriteLine("Double: {0:f2} lv.", doubleStudio);
  62.             Console.WriteLine("Suite: {0:f2} lv.", masterSuite);
  63.         }
  64.     }
  65. }
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top