Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp32
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14.  
  15. double budget = double.Parse(Console.ReadLine());
  16. int actors = int.Parse(Console.ReadLine());
  17. double clothesPrice = double.Parse(Console.ReadLine());
  18.  
  19. double clothesPriceAll = clothesPrice * actors;
  20.  
  21. if (actors > 150)
  22. {
  23. clothesPriceAll *= 1 - 0.1;
  24. }
  25.  
  26. double decor = 0.1 * budget;
  27. double finalBudget = decor + clothesPriceAll;
  28.  
  29. if (finalBudget > budget)
  30. {
  31. double left = finalBudget - budget;
  32. Console.WriteLine("Not enough money!");
  33. Console.WriteLine($"Wingard needs {left:F2} leva more.");
  34. }
  35. else if (finalBudget <= budget)
  36. {
  37. double left = budget - finalBudget;
  38. Console.WriteLine("Action!");
  39. Console.WriteLine($"Wingard starts filming with {left:F2} leva left.");
  40. }
  41. }
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement