Advertisement
spasnikolov131

Untitled

Apr 6th, 2022
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. namespace beginning2
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10.  
  11. string[] firsMatch = Console.ReadLine().Split(':');
  12. string[] secondMatch = Console.ReadLine().Split(':');
  13. string[] thirdMatch = Console.ReadLine().Split(':');
  14.  
  15. int goalsHomee = int.Parse(firsMatch[0]);
  16. int goalsArrr = int.Parse(firsMatch[1]);
  17. int goalsHomeSecond = int.Parse(secondMatch[0]);
  18. int goalsArrSecond = int.Parse(secondMatch[1]);
  19. int goalsHomeThird = int.Parse(thirdMatch[0]);
  20. int goalsArrThird = int.Parse(thirdMatch[1]);
  21.  
  22. int win = 0;
  23. int draw = 0;
  24. int loss = 0;
  25.  
  26.  
  27. if (goalsHomee > goalsArrr)
  28. {
  29. win++;
  30.  
  31. }
  32. else if (goalsHomeSecond<goalsArrSecond)
  33. {
  34. loss++;
  35.  
  36. }
  37. else if (goalsHomeThird == goalsArrThird)
  38. {
  39. draw++;
  40.  
  41. }
  42. Console.WriteLine($"Team won {win} games.");
  43. Console.WriteLine($"Team lost {loss} games.");
  44. Console.WriteLine($"Drawn games: {draw}");
  45. }
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement