Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace FootballResults
- {
- class Program
- {
- static void Main(string[] args)
- {
- int winCount = 0;
- int drawnCount = 0;
- int lostCount = 0;
- for (int i = 0; i < 3; i++)
- {
- List<int> result = Console.ReadLine().Split(":").Select(int.Parse).ToList();
- if (result[0]>result[1])
- {
- winCount++;
- }
- if (result[0]<result[1])
- {
- lostCount++;
- }
- if (result[0] == result[1])
- {
- drawnCount++;
- }
- }
- Console.WriteLine($"Team won {winCount} games.");
- Console.WriteLine($"Team lost {lostCount} games.");
- Console.WriteLine($"Drawn games: {drawnCount}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement