Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace exampreparation
- {
- class exam
- {
- 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());
- int price = 0;
- if (season == "Winter")
- {
- if (destination == "Dubai")
- {
- price = 45000;
- }
- else if (destination == "Sofia")
- {
- price = 17000;
- }
- else
- {
- price = 24000;
- }
- }
- else
- {
- if (destination == "Dubai")
- {
- price = 40000;
- }
- else if (destination == "Sofia")
- {
- price = 12500;
- }
- else
- {
- price = 20250;
- }
- }
- double sum = price * days;
- if (destination == "Dubai")
- {
- sum *= 0.70;
- }
- if (destination == "Sofia")
- {
- sum *= 1.25;
- }
- if (budget >= sum)
- {
- Console.WriteLine($"The budget for the movie is enough! We have {budget-sum:f2} leva left!");
- }
- else
- {
- Console.WriteLine($"The director needs {sum-budget:f2} leva more!");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment