Advertisement
Guest User

Untitled

a guest
Jul 18th, 2016
845
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. using System;
  2. using System.Numerics;
  3. using System.Text.RegularExpressions;
  4.  
  5. public class LettersSymbolsNumbers
  6. {
  7. static void Main()
  8.  
  9. {
  10. double budget = double.Parse(Console.ReadLine());
  11. string input = Console.ReadLine();
  12. double broiHoraGrupa = double.Parse(Console.ReadLine());
  13.  
  14. double VIPResult = 499.99;
  15. double normalResult = 249.99;
  16.  
  17. double test = 0;
  18.  
  19. if (broiHoraGrupa >= 1 && broiHoraGrupa <= 4)
  20. {
  21. test = budget * 25 / 100;
  22. budget -= test;
  23. }
  24.  
  25.  
  26. else if (broiHoraGrupa >= 5 && broiHoraGrupa <= 9)
  27. {
  28. test = budget * 40 / 100;
  29. budget -= test;
  30. }
  31. else if (broiHoraGrupa >= 10 && broiHoraGrupa <= 24)
  32. {
  33. test = budget * 50 / 100;
  34. budget -= test;
  35. }
  36. else if (broiHoraGrupa >= 25 && broiHoraGrupa <= 49)
  37. {
  38. test = budget * 60 / 100;
  39. budget -= test;
  40. }
  41. else if (broiHoraGrupa >= 50)
  42. {
  43. test = budget * 75 / 100;
  44. budget -= test;
  45. }
  46. if (input == "VIP")
  47. {
  48. VIPResult *= broiHoraGrupa;
  49. if (VIPResult < test)
  50. {
  51. Console.WriteLine("Yes! You have {0:F2} leva left.", test - normalResult);
  52. }
  53.  
  54. else
  55. {
  56. Console.WriteLine("Not enough money! You need {0:F2} leva.",VIPResult - test);
  57. }
  58.  
  59. }
  60.  
  61. else if (input == "Normal")
  62. {
  63. normalResult *= broiHoraGrupa;
  64.  
  65. if (normalResult < test)
  66. {
  67. Console.WriteLine("Yes! You have {0:F2} leva left.", test - normalResult);
  68. }
  69. else
  70. {
  71. Console.WriteLine("Not enough money! You need {0:F2} leva.", normalResult - test);
  72. }
  73. }
  74.  
  75.  
  76. }
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement