Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ConsoleApp9
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- string month = Console.ReadLine();
- int stay = int.Parse(Console.ReadLine());
- double totalCostStudio = 0;
- double totalCostApart = 0;
- if (stay > 200)
- {
- }
- if (month == "May" || month == "October")
- {
- if (stay > 7 && stay <= 14)
- {
- totalCostApart = stay * 65;
- totalCostStudio = (stay * 50) * 0.95;
- }
- else if (stay > 14)
- {
- totalCostApart = (stay * 65) * 0.9;
- totalCostStudio = (stay * 50) * 0.7;
- }
- else
- {
- totalCostApart = stay * 65;
- totalCostStudio = stay * 50;
- }
- }
- if (month == "June" || month == "September")
- {
- if (stay > 14)
- {
- totalCostApart = (stay * 68.7) * 0.9;
- totalCostStudio = (stay * 75.2) * 0.8;
- }
- else
- {
- totalCostApart = stay * 68.7;
- totalCostStudio = stay * 75.2;
- }
- }
- if (month == "July" || month == "August")
- {
- totalCostStudio = stay * 76;
- if (stay > 14)
- {
- totalCostApart = (stay * 77) * 0.9;
- }
- else
- {
- totalCostApart = stay * 77;
- }
- }
- else
- {
- }
- Console.WriteLine($"Apartment: {totalCostApart:f2} lv.");
- Console.WriteLine($"Studio: {totalCostStudio:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment