Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace demo
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- int statists = int.Parse(Console.ReadLine());
- double clothingPrice = double.Parse(Console.ReadLine());
- double decor = budget * 0.10; //done
- double clothing = statists * clothingPrice;
- if (statists >= 150)
- {
- clothing = clothing - clothing * 0.1;
- }
- double neededMoney = clothing + decor;
- double difference = budget - neededMoney;
- 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