Advertisement
Guest User

bonusP

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