Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp32
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- int actors = int.Parse(Console.ReadLine());
- double clothesPrice = double.Parse(Console.ReadLine());
- double clothesPriceAll = clothesPrice * actors;
- if (actors > 150)
- {
- clothesPriceAll *= 1 - 0.1;
- }
- double decor = 0.1 * budget;
- double finalBudget = decor + clothesPriceAll;
- if (finalBudget > budget)
- {
- double left = finalBudget - budget;
- Console.WriteLine("Not enough money!");
- Console.WriteLine($"Wingard needs {left:F2} leva more.");
- }
- else if (finalBudget <= budget)
- {
- double left = budget - finalBudget;
- Console.WriteLine("Action!");
- Console.WriteLine($"Wingard starts filming with {left:F2} leva left.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement