static void PrintPrices(string month, int days)
double priceOfStudio = 0;
priceOfStudio = 50 * days;
if (days < 14 && 7 < days)
priceOfStudio = priceOfStudio * 0.95;
priceOfStudio = priceOfStudio * 0.7;
priceOfStudio = 75.2 * days;
priceOfFlat = 68.7 * days;
priceOfStudio = priceOfStudio * 0.8;
priceOfStudio = 76 * days;
priceOfFlat = priceOfFlat * 0.9;
Console.WriteLine("Apartment: {0:f2} lv.", Math.Round(priceOfFlat, 2));
Console.WriteLine("Studio: {0:f2} lv.", Math.Round(priceOfStudio, 2));
static string CheckMonth(string month)
while (month != "may" && month != "june" && month != "july" && month != "august" && month != "september" && month != "october")
Console.WriteLine("The month is wrong. The monts can be only \"May\", \"June\", \"July\", \"August\", \"September\" or \"October\". Enter the month again");
Console.Write("The month is ");
month = Console.ReadLine().ToLower();
static int CheckDays(int num)
while(num < 0 || 200 < num)
Console.WriteLine("The days can be between 0 and 200. Enter them again.");
Console.Write("The number days in which you will be in the hotel is ");
num = int.Parse(Console.ReadLine());
public static void Main()
Console.Write("The month is ");
string month = CheckMonth(Console.ReadLine().ToLower());
Console.Write("The number days in which you will be in the hotel is ");
int days = CheckDays(int.Parse(Console.ReadLine()));
PrintPrices(month, days);