Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _02.Football_Results
- {
- class Program
- {
- static void Main(string[] args)
- {
- int counterWon = 0;
- int counterLost = 0;
- int counterDrawn = 0;
- string FirstMatch = Console.ReadLine();
- string SecondMatch = Console.ReadLine();
- string ThirthMatch = Console.ReadLine();
- int FirstMatch1 = FirstMatch[0];
- int SecondMatch1 = SecondMatch[0];
- int ThirthMatch1 = ThirthMatch[0];
- int FirstMatch2 = FirstMatch[3];
- int SecondMatch2 = SecondMatch[3];
- int ThirthMatch2 = ThirthMatch[3];
- if (FirstMatch1>FirstMatch2)
- {
- counterWon++;
- }
- else if (FirstMatch1 < FirstMatch2)
- {
- counterLost++;
- }
- else
- {
- counterDrawn++;
- }
- //
- if (SecondMatch1 > SecondMatch2)
- {
- counterWon++;
- }
- else if (SecondMatch1 > SecondMatch2)
- {
- counterLost++;
- }
- else
- {
- counterDrawn++;
- }
- //
- if (ThirthMatch1 > ThirthMatch2)
- {
- counterWon++;
- }
- else if (ThirthMatch1 > ThirthMatch2)
- {
- counterLost++;
- }
- else
- {
- counterDrawn++;
- }
- Console.WriteLine($"Team won {counterWon} games.");
- Console.WriteLine($"Team lost {counterLost} games.");
- Console.WriteLine($"Drawn games: {counterDrawn}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement