Pretorianbg

bonusscore

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