Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Speed
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- int extras = int.Parse(Console.ReadLine());
- double priceForCostumePerPerson = double.Parse(Console.ReadLine());
- double priceForDecor = budget * 0.1;
- double totalCostumePrice = extras * priceForCostumePerPerson;
- double expenseForMovie = 0.00;
- if (extras > 150)
- { totalCostumePrice *= 0.9; }
- expenseForMovie = priceForDecor + totalCostumePrice;
- if (budget > expenseForMovie)
- {
- double extraBudget = budget - expenseForMovie;
- Console.WriteLine($"Action!");
- Console.WriteLine($"Wingard starts filming with {extraBudget:f2} leva left.");
- }
- else
- {
- double moneyNeeded = expenseForMovie - budget;
- Console.WriteLine($"Not enough money!");
- Console.WriteLine($"Wingard needs {moneyNeeded:f2} leva more.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment