Advertisement
cvet40

Untitled

May 29th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 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 p06.Bonus_Score
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int points = int.Parse(Console.ReadLine());
  14.  
  15. double bonusPoints = 0;
  16.  
  17. if (points <= 100)
  18. {
  19. bonusPoints = 5;
  20. }
  21. else if (points <= 1000)
  22. {
  23. bonusPoints = points * 0.2;
  24. }
  25. else
  26. {
  27. bonusPoints = points * 0.1;
  28. }
  29.  
  30. if (points % 2 == 0)
  31. {
  32. bonusPoints += 1;
  33. }
  34. if (points % 10 == 5)
  35. {
  36. bonusPoints += 2;
  37. }
  38.  
  39. Console.WriteLine(bonusPoints);
  40. Console.WriteLine(bonusPoints + points);
  41. }
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement