Advertisement
Guest User

Untitled

a guest
Oct 20th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 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 ConsoleApplication5
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. Console.WriteLine("enter: ");
  14. var point = double.Parse(Console.ReadLine());
  15. var bonus = 0.0;
  16.  
  17.  
  18. if (point <= 100)
  19. {
  20. bonus = 5;
  21. }
  22. else if (point < 1000)
  23. {
  24. bonus = point * 0.2f;
  25. }
  26. else
  27. {
  28. bonus = point * 0.1f;
  29. }
  30.  
  31. if (point % 2 == 0)
  32. {
  33. bonus += 1;
  34. }
  35. if (point % 10 == 5)
  36. {
  37. bonus += 2;
  38. }
  39. var score = point + bonus;
  40. Console.WriteLine(bonus);
  41. Console.WriteLine(score);
  42.  
  43. }
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement