Advertisement
Guest User

Untitled

a guest
Jun 15th, 2016
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication14
  8. {
  9. class Program
  10. {
  11. static void Main()
  12. {
  13. int number = int.Parse(Console.ReadLine());
  14. double bonus = 0.0;
  15.  
  16. if (number <= 100)
  17. {
  18. bonus = 5;
  19. }
  20. else if (number > 100 && number <= 1000)
  21. {
  22. bonus = (number / 5.0);
  23. }
  24. else if (number > 1000)
  25. {
  26. bonus = (number / 10.0);
  27. }
  28. if (number % 2 == 0)
  29. {
  30. bonus += 1;
  31. }
  32. else if (number % 10 == 5)
  33. {
  34. bonus += 2;
  35. }
  36. double totalscore = number + bonus;
  37. Console.WriteLine(bonus);
  38. Console.WriteLine(totalscore);
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement