Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Hotelska_staq
- {
- class Program
- {
- static void Main(string[] args)
- {
- string month;
- int days;
- double priceS;
- double priceA;
- double wholePs;
- double wholePa;
- month = Console.ReadLine();
- days = Convert.ToInt32(Console.ReadLine());
- if (month == "May" || month == "October")
- {
- priceS = 50;
- priceA = 65;
- if (days >=7 && days<14)
- {
- priceS = priceS - (priceS * 5 / 100);
- wholePs = priceS * days;
- wholePa = priceA * days;
- Console.WriteLine("Apartment: " + wholePa.ToString("#.00") + " lv.");
- Console.WriteLine("Studio: " + wholePs.ToString("#.00") + " lv.");
- }
- else
- if (days >= 14)
- {
- priceS = priceS - (priceS * 30 / 100);
- priceA = priceA - (priceA * 10 / 100);
- wholePs = priceS * days;
- wholePa = priceA * days;
- Console.WriteLine("Apartment: " + wholePa.ToString("#.00") + " lv.");
- Console.WriteLine("Studio: " + wholePs.ToString("#.00") + " lv.");
- }
- else
- {
- wholePs = priceS * days;
- wholePa = priceA * days;
- Console.WriteLine("Apartment: " + wholePa.ToString("#.00") + " lv.");
- Console.WriteLine("Studio: " + wholePs.ToString("#.00") + " lv.");
- }
- }
- if (month == "June" || month == "September")
- {
- priceS = 75.20;
- priceA = 68.70;
- if (days > 13)
- {
- priceS = priceS - (priceS * 20 / 100);
- priceA = priceA - (priceA * 10 / 100);
- wholePs = priceS * days;
- wholePa = priceA * days;
- Console.WriteLine("Apartment: " + wholePa.ToString("#.00") + " lv.");
- Console.WriteLine("Studio: " + wholePs.ToString("#.00") + " lv.");
- }
- else
- {
- wholePs = priceS * days;
- wholePa = priceA * days;
- Console.WriteLine("Apartment: " + wholePa.ToString("#.00") + " lv.");
- Console.WriteLine("Studio: " + wholePs.ToString("#.00") + " lv.");
- }
- }
- if (month == "July" || month == "August")
- {
- priceS = 76;
- priceA = 77;
- if (days >= 14)
- {
- priceA = priceA - (priceA * 10 / 100);
- wholePs = priceS * days;
- wholePa = priceA * days;
- Console.WriteLine("Apartment: " + wholePa.ToString("#.00") + " lv.");
- Console.WriteLine("Studio: " + wholePs.ToString("#.00") + " lv.");
- }
- else
- {
- wholePs = priceS * days;
- wholePa = priceA * days;
- Console.WriteLine("Apartment: " + wholePa.ToString("#.00") + " lv.");
- Console.WriteLine("Studio: " + wholePs.ToString("#.00") + " lv.");
- }
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement