Posts

Showing posts from March 11, 2021

Two Teams - Find the Winner

  Two Teams - Find the Winner  PROBLEM STATEMENT : There are two teams A and B playing a game. The game consists of N rounds. The points scored by both teams in N rounds are passed as the input to the program. The winner of the game is declared based on the following conditions.  - The team that wins more rounds than the other team is the winner of the game.  - If both teams win the same number of rounds, the team with the most points wins the game.  - If both teams win the same number of rounds and have the same number of points, then the result of the last round is considered.  The program must print the output based on the following conditions.  - If team A wins the game, then print the string value "Team A".  - If team B wins the game, then print the string value "Team B".  - If the result is a tie, then print the string value "TIE".  Boundary Condition(s):   1 <= N <= 100  Input Format:   The first line contains...