Advertisement
kzborisov

Untitled

Sep 29th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 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 Game_Statistics
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int minutes = int.Parse(Console.ReadLine());
  14. string name = Console.ReadLine();
  15.  
  16. if (minutes == 0)
  17. Console.WriteLine("Match has just began! ");
  18. else if (minutes < 45)
  19. Console.WriteLine("First half time.");
  20. else if (minutes >= 45)
  21. Console.WriteLine("Second half time.");
  22.  
  23. if (minutes > 0 && minutes <= 10)
  24. {
  25. Console.WriteLine($"{name} missed a penalty.");
  26. if (minutes % 2 == 0)
  27. {
  28. Console.WriteLine($"{name} was injured after the penalty.");
  29. }
  30. }
  31. else if (minutes > 10 && minutes <= 35)
  32. {
  33. Console.WriteLine($"{name} received yellow card.");
  34. if (minutes % 2 == 1)
  35. {
  36. Console.WriteLine($"{name} got another yellow card.");
  37. }
  38. }
  39. else if (minutes > 35 && minutes <= 45)
  40. {
  41. Console.WriteLine($"{name} SCORED A GOAL !!!");
  42. }
  43. else if (minutes > 45 && minutes <= 55)
  44. {
  45. Console.WriteLine($"{name} got a freekick.");
  46. if (minutes % 2 == 0)
  47. {
  48. Console.WriteLine($"{name} missed the freekick.");
  49. }
  50. }
  51. else if (minutes > 55 && minutes <= 80)
  52. {
  53. Console.WriteLine($"{name} missed a shot from corner.");
  54. if (minutes % 2 == 1)
  55. {
  56. Console.WriteLine($"{name} has been changed with another player.");
  57. }
  58. }
  59. else if (minutes > 80 && minutes <= 90)
  60. {
  61. Console.WriteLine($"{name} SCORED A GOAL FROM PENALTY !!!");
  62. }
  63. }
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement