Advertisement
miglenabs

Untitled

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