Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Input
- double movieBudget = double.Parse(Console.ReadLine());
- int actorsCount = int.Parse(Console.ReadLine());
- double actorClothingPrice = double.Parse(Console.ReadLine());
- //Calculations
- double decorPrice = movieBudget * 0.1;
- double actorsClothingBill = actorsCount * actorClothingPrice;
- if (actorsCount > 150)
- {
- actorsClothingBill = actorsClothingBill * 0.9;
- }
- double bill = decorPrice + actorsClothingBill;
- //Output
- if (bill > movieBudget)
- {
- double neededMoney = bill - movieBudget;
- Console.WriteLine("Not enough money!");
- Console.WriteLine($"Wingard needs {neededMoney:f2} leva more.");
- }
- else
- {
- double remainingMoney = movieBudget - bill;
- Console.WriteLine("Action!");
- Console.WriteLine($"Wingard starts filming with {remainingMoney:f2} leva left.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement