Advertisement
spasnikolov131

Untitled

May 13th, 2021
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Conditional_Statements_Advanced___More_Exercises
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double vip = 499.99;
  10. double normal = 249.99;
  11.  
  12. double budget = double.Parse(Console.ReadLine());
  13. string category = Console.ReadLine();
  14. double people = double.Parse(Console.ReadLine());
  15.  
  16. if (people >= 25 && people >= 49)
  17. {
  18. if (category == "VIP")
  19. {
  20. double moneyLefted = budget - ((budget * 40) / 100);
  21. double categoryVip = vip * people;
  22. Console.WriteLine($"Not enough money! You need {categoryVip - moneyLefted:f2} leva.");
  23. }
  24. }
  25. else if (people > 1 && people <= 4)
  26. {
  27. if (category == "Normal")
  28. {
  29. double moneyLefted = budget - ((budget * 75) / 100);
  30. double categoryNormal = normal * people;
  31. Console.WriteLine($"Yes! You have {moneyLefted - categoryNormal:f2} leva left.");
  32. }
  33. }
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement