Advertisement
Guest User

Untitled

a guest
Feb 29th, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Football
  4. {
  5. class Program
  6. {
  7. static void Main()
  8. {
  9. int win = 0;
  10. int lostcount = 0;
  11. int drawncount = 0;
  12.  
  13. for (int i = 1; i <= 3; i++)
  14. {
  15. string input = Console.ReadLine();
  16.  
  17. char first = input[0];
  18. char second = input[2];
  19.  
  20. if (first > second)
  21. {
  22. win++;
  23. }
  24. else if (first < second)
  25. {
  26. lostcount++;
  27. }
  28. else if (first == second)
  29. {
  30. drawncount++;
  31. }
  32. }
  33.  
  34. Console.WriteLine($"Team won {win} games.");
  35. Console.WriteLine($"Team lost {lostcount} games.");
  36. Console.WriteLine($"Drawn games: {drawncount}");
  37.  
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement