Advertisement
pavlinpetkov771

Untitled

May 22nd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. using System;
  2.  
  3. namespace BonusPoints
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int points = int.Parse(Console.ReadLine());
  10. double bonus = 0.0;
  11.  
  12.  
  13. if (points >= 100)
  14. {
  15. bonus = 5;
  16.  
  17. }
  18. else if (points < 1000)
  19. {
  20. bonus = points * 0.20;
  21.  
  22. }
  23. else
  24. {
  25. bonus = points * 0.10;
  26.  
  27. }
  28. if (points % 2 == 0)
  29. {
  30. bonus = bonus + 1;
  31. }
  32. else if (points % 10 == 5)
  33. {
  34. bonus = bonus + 2;
  35. }
  36. Console.WriteLine(bonus);
  37. Console.WriteLine(points+bonus);
  38.  
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement