Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace MovieDestination
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- string destination = Console.ReadLine();
- string season = Console.ReadLine();
- int days = int.Parse(Console.ReadLine());
- double sum = 0;
- switch (destination)
- {
- case "Dubai":
- switch (season)
- {
- case "Winter":
- sum = 0.7 * 45000;
- break;
- case "Summer":
- sum = 40000 * 0.7;
- break;
- }
- break;
- case "Sofia":
- switch (season)
- {
- case "Winter":
- sum = 1.25 * 17000;
- break;
- case "Summer":
- sum = 12500 * 1.25;
- break;
- }
- break;
- case "London":
- switch (season)
- {
- case "Winter":
- sum = 24000;
- break;
- case "Summer":
- sum = 20250;
- break;
- }
- break;
- }
- double total = sum * days;
- if (total <= budget)
- {
- Console.WriteLine($"The budget for the movie is enough! We have {budget - total:F2} leva left!");
- }
- else
- {
- Console.WriteLine($"The director needs {total - budget:F2} leva more!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement