Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _05.Godzillavs.Kong
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- int countOfStatists = int.Parse(Console.ReadLine());
- double priceForOneCloth = double.Parse(Console.ReadLine());
- double clothesPrice = countOfStatists * priceForOneCloth;
- double decoring = 0.1 * budget;
- if (countOfStatists > 150)
- {
- clothesPrice = 0.9 * clothesPrice;
- }
- double expenses = decoring + clothesPrice;
- if (expenses > budget)
- {
- Console.WriteLine("Not enough money!");
- double needMoney = expenses - budget;
- Console.WriteLine($"Wingard needs {needMoney:F2} leva more.");
- }
- else
- {
- Console.WriteLine("Action!");
- double moneyLeft = budget - expenses;
- Console.WriteLine($"Wingard starts filming with {moneyLeft:F2} leva left.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement