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