Guest User

Untitled

a guest
Jun 26th, 2016
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. using System;
  4.  
  5. namespace _06.BonusPoint
  6. {
  7. class BonustPoint
  8. {
  9. static void Main(string[] args)
  10. {
  11. int number = int.Parse(Console.ReadLine());
  12. double result = number;
  13. double bonus = 0.0;
  14.  
  15. if (number > 100 && number <=1000)
  16. {
  17. bonus = number / 5.0;
  18. }
  19. else if (number <= 100)
  20. {
  21. bonus = 5;
  22. }
  23. else if(number > 1000)
  24. {
  25. bonus = number / 10.0;
  26. }
  27.  
  28. if (number % 2 == 0)
  29. {
  30. bonus++;
  31. }
  32. else if (number % 5 == 0)
  33. {
  34. bonus += 2;
  35. }
  36. double totalScore = number + bonus;
  37. Console.WriteLine("Bonus score: " + bonus);
  38. Console.WriteLine("Total score: " + totalScore);
  39. }
  40. }
  41. }
RAW Paste Data