desislava777

Bonus Score

Oct 22nd, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 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 ConsoleApplication56
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var num = int.Parse(Console.ReadLine());
  14. double BonusPoint=0;
  15. if (num > 1000)
  16. {
  17. BonusPoint = num * 0.10;
  18. }
  19. else if (num <= 100)
  20. {
  21. BonusPoint = 5;
  22. }
  23. else if (num > 100)
  24. {
  25. BonusPoint = num * 0.20;
  26. }
  27. if(num%10==5)
  28. {
  29. BonusPoint += 2;
  30. }
  31. else if (num%2==0)
  32. {
  33. BonusPoint += 1;
  34. }
  35. Console.WriteLine("Bonus score: {0}", BonusPoint);
  36. Console.WriteLine("Total score: {0}", num + BonusPoint);
  37. }
  38. }
  39. }
Add Comment
Please, Sign In to add comment