Advertisement
fumanbest

Bonus Score

Sep 27th, 2018
141
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 Bonus_Score
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int num = int.Parse(Console.ReadLine());
  14. double bonusPoint = 0.0;
  15. if (num <= 100)
  16. {
  17. bonusPoint = (num + 5) - num;
  18. }
  19. if ((num > 100) && (num <= 1000))
  20. {
  21. bonusPoint = num * 0.2;
  22. }
  23. if (num > 1000)
  24. {
  25. bonusPoint = num * 0.1;
  26. }
  27. if (num % 2 == 0)
  28. {
  29. bonusPoint += 1;
  30. }
  31. else if (num % 10 == 5)
  32. {
  33. bonusPoint += 2;
  34. }
  35. Console.WriteLine(bonusPoint);
  36. Console.WriteLine(num + bonusPoint);
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement