Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Ex._2
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Декорът = 10% от бюджета.
- //статиста>150 -> отстъпка за облеклото =-10 %.
- double budget = double.Parse(Console.ReadLine());
- int extras = int.Parse(Console.ReadLine());
- double clothingPrice = double.Parse(Console.ReadLine());
- double decor = budget * 10 / 100;
- double clothingMoney = extras * clothingPrice;
- if (extras > 150)
- {
- clothingMoney = clothingMoney - clothingMoney * 10 / 100;
- }
- double difference = budget - (clothingMoney + decor);
- if (difference>=0)
- {
- Console.WriteLine("Action!");
- Console.WriteLine($"Wingard starts filming with {difference:F2} leva left.");
- }
- else
- {
- difference = Math.Abs(difference);
- Console.WriteLine("Not enough money!");
- Console.WriteLine($"Wingard needs {difference:F2} leva more.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment