Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _03.MovieDestination
- {
- class MovieDestination
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- string destination = Console.ReadLine();
- string season = Console.ReadLine();
- int numDays = int.Parse(Console.ReadLine());
- double price = 0.0;
- double totalPrice = 0.0;
- if (destination == "Dubai")
- {
- if (season == "Winter")
- {
- price = numDays * 45000;
- totalPrice = price - (price * 0.3);
- }
- else
- {
- price = numDays * 40000;
- totalPrice = price - (price * 0.3);
- }
- }
- else if (destination == "Sofia")
- {
- if (season == "Winter")
- {
- price = numDays * 17000;
- totalPrice = price + (price * 0.25);
- }
- else
- {
- price = numDays * 12500;
- totalPrice = price + (price * 0.25);
- }
- }
- else if (destination == "London")
- {
- if (season == "Winter")
- {
- totalPrice = numDays * 24000;
- }
- else
- {
- totalPrice = numDays * 20250;
- }
- }
- if (totalPrice <= budget)
- {
- Console.WriteLine($"The budget for the movie is enough! We have {Math.Abs(budget - totalPrice):f2} leva left!");
- }
- else
- {
- Console.WriteLine($"The director needs {Math.Abs(budget - totalPrice):f2} leva more!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment