Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _02._Football_Results
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- string Match = (Console.ReadLine());
- int wins = 0;
- int lose = 0;
- int draw = 0;
- for (int i = 0; i <= 2; i++)
- {
- char result = Match[(int)0];
- char result2 = Match[(int)2];
- if (result > result2)
- {
- wins++;
- }
- else if (result < result2)
- {
- lose++;
- }
- else if (result == result2)
- {
- draw++;
- }
- if (i == 2)
- {
- break;
- }
- Match = (Console.ReadLine());
- }
- Console.WriteLine($"Team won {wins} games.");
- Console.WriteLine($"Team lost {lose} games.");
- Console.WriteLine($"Drawn games: {draw}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement