Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace FootballResults
- {
- class Program
- {
- static void Main()
- {
- int won = 0;
- int lost = 0;
- int drawn = 0;
- for (int i = 0; i < 3; i++)
- {
- string game = Console.ReadLine();
- int teamOneResult = (int)game[0];
- int teamTwoResult = (int)game[2];
- if (teamOneResult > teamTwoResult)
- {
- won++;
- }
- else if (teamTwoResult > teamOneResult)
- {
- lost++;
- }
- else
- {
- drawn++;
- }
- }
- Console.WriteLine($"Team won { won} games.");
- Console.WriteLine($"Team lost { lost} games.");
- Console.WriteLine($"Drawn games: { drawn}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement