Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace beginning2
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] firsMatch = Console.ReadLine().Split(':');
- string[] secondMatch = Console.ReadLine().Split(':');
- string[] thirdMatch = Console.ReadLine().Split(':');
- int goalsHomee = int.Parse(firsMatch[0]);
- int goalsArrr = int.Parse(firsMatch[1]);
- int goalsHomeSecond = int.Parse(secondMatch[0]);
- int goalsArrSecond = int.Parse(secondMatch[1]);
- int goalsHomeThird = int.Parse(thirdMatch[0]);
- int goalsArrThird = int.Parse(thirdMatch[1]);
- int win = 0;
- int draw = 0;
- int loss = 0;
- if (goalsHomee > goalsArrr)
- {
- win++;
- }
- else if (goalsHomeSecond<goalsArrSecond)
- {
- loss++;
- }
- else if (goalsHomeThird == goalsArrThird)
- {
- draw++;
- }
- Console.WriteLine($"Team won {win} games.");
- Console.WriteLine($"Team lost {loss} games.");
- Console.WriteLine($"Drawn games: {draw}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement