SHARE
TWEET

Untitled

a guest Feb 27th, 2020 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace ConsoleApp15
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string mounth = Console.ReadLine();
  10.             int days = int.Parse(Console.ReadLine());
  11.  
  12.             double studioPrice = 0;
  13.             double apartmentPrice = 0;
  14.             double discount = 0;
  15.             double discount2 = 0;
  16.  
  17.             if (mounth == "May" || mounth == "October")
  18.             {
  19.                 studioPrice = 50 * days;
  20.                 apartmentPrice = 65 * days;
  21.                 if (days > 7 || days <= 14)
  22.                 {
  23.                     discount = studioPrice - 0.05 * studioPrice;
  24.                 }
  25.                 else if (days > 14)
  26.                 {
  27.                     discount = studioPrice - 0.3 * studioPrice;
  28.                     discount2 = apartmentPrice - 0.1 * apartmentPrice;
  29.                 }
  30.             }
  31.             else if (mounth == "June" || mounth == "September")
  32.             {
  33.  
  34.                 studioPrice = 75.20 * days;
  35.                 apartmentPrice = 68.70 * days;
  36.                 if (days > 14)
  37.                 {
  38.                     discount = studioPrice - 0.2 * studioPrice;
  39.                     discount2 = apartmentPrice - 0.1 * apartmentPrice;
  40.                 }
  41.             }
  42.             else if (mounth == "July" || mounth == "August")
  43.             {
  44.                 studioPrice = 76 * days;
  45.                 apartmentPrice = 77 * days;
  46.                 if (days > 14)
  47.                 {
  48.                     discount2 = apartmentPrice - 0.1 * apartmentPrice;
  49.                 }
  50.             }
  51.            
  52.  
  53.             Console.WriteLine($"{apartmentPrice:F2} lv");
  54.             Console.WriteLine($"{studioPrice:F2} lv");
  55.         }
  56.     }
  57. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top