mattnguyen

Untitled

Feb 21st, 2021
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Speed
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double budget = double.Parse(Console.ReadLine());
  10. int extras = int.Parse(Console.ReadLine());
  11. double priceForCostumePerPerson = double.Parse(Console.ReadLine());
  12.  
  13. double priceForDecor = budget * 0.1;
  14. double totalCostumePrice = extras * priceForCostumePerPerson;
  15. double expenseForMovie = 0.00;
  16.  
  17.  
  18. if (extras > 150)
  19. { totalCostumePrice *= 0.9; }
  20.  
  21.  
  22. expenseForMovie = priceForDecor + totalCostumePrice;
  23.  
  24. if (budget > expenseForMovie)
  25. {
  26. double extraBudget = budget - expenseForMovie;
  27.  
  28. Console.WriteLine($"Action!");
  29. Console.WriteLine($"Wingard starts filming with {extraBudget:f2} leva left.");
  30. }
  31. else
  32. {
  33. double moneyNeeded = expenseForMovie - budget;
  34.  
  35. Console.WriteLine($"Not enough money!");
  36. Console.WriteLine($"Wingard needs {moneyNeeded:f2} leva more.");
  37. }
  38.  
  39. }
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46. }
  47. }
  48.  
  49.  
Advertisement
Add Comment
Please, Sign In to add comment