Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
1,156
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 ConsoleApplication7
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. Console.WriteLine("Enter score : ");
  14. var num = int.Parse(Console.ReadLine());
  15. var bonusPoints = 0.0;
  16. if (num <= 100) ;
  17. {
  18. bonusPoints = 5;
  19. }
  20. else if (num > 100) ;
  21. {
  22. bonusPoints = num * 0.20;
  23. }
  24. else if (num > 1000) ;
  25. {
  26. bonusPoints = num * 0.10;
  27. }
  28. if (num % 2 == 0) ;
  29. {
  30. bonusPoints += 1;
  31. }
  32. else if (num % 10 == 5) ;
  33. {
  34. bonusPoints += 2;
  35. }
  36. Console.WriteLine("Bonus score: {0}", bonusPoints);
  37. Console.WriteLine("Total score: {0}", num + bonusPoints);
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement