Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Godzilla_vs._Kong
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double movieBudged = double.Parse(Console.ReadLine());
  10. int statistsCount = int.Parse(Console.ReadLine());
  11. double statistClothesPrice = double.Parse(Console.ReadLine());
  12.  
  13. double decorSum = movieBudged * 0.10;
  14. double clothesSum = statistsCount * statistClothesPrice;
  15. double discount = 0.0;
  16. if (statistsCount > 150)
  17. {
  18. discount = clothesSum * 0.10;
  19. clothesSum = clothesSum - discount;
  20. }
  21.  
  22. double totalSum = decorSum + clothesSum;
  23.  
  24. if (totalSum > movieBudged)
  25. {
  26. Console.WriteLine("Not enough money!");
  27. Console.WriteLine("Wingard needs {0:F2} leva more.", Math.Abs(movieBudged - totalSum));
  28. }
  29. else if (totalSum <= movieBudged)
  30. {
  31. Console.WriteLine("Action!");
  32. Console.WriteLine("Wingard starts filming with {0:F2} leva left.", movieBudged - totalSum);
  33. }
  34.  
  35.  
  36.  
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement