Advertisement
bossplayaz

Untitled

Oct 21st, 2017
578
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using System;
  2.  
  3. namespace BonusPoints
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. var num = int.Parse(Console.ReadLine());
  10. var bonusScore = 0.0;
  11. if (num<=100)
  12. {
  13. bonusScore = 5;
  14. }
  15. else if (num>100)
  16. {
  17. bonusScore = num * 20 / 100.0;
  18. }
  19. else if (num > 1000)
  20. {
  21. bonusScore = num * 10 / 100.0;
  22. }
  23. if (num % 2 == 0)
  24. {
  25. bonusScore += 1;
  26. }
  27. else if (num % 10 == 5)
  28. {
  29. bonusScore += 2;
  30. }
  31. Console.WriteLine(bonusScore);
  32. Console.WriteLine(num + bonusScore);
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement