003-002-006

Comparison Operators: Score Ranking

Easy

Problem Description

Comparison Operators: Score Ranking

In this problem, you will create a program that compares two test scores using comparison operators (>, <, ==) to determine the ranking (1st place or tied) and displays the result to standard output.

Learning Objective: Determine magnitude with comparison operators

Compare test scores of two people and determine who has higher score. Decide ranking using comparison operators.

Input

Line 1: Person A score (integer)
Line 2: Person B score (integer)

Output

If A has higher score:

Person A: [score1] pts
Person B: [score2] pts
Person A is 1st

If B has higher score:

Person A: [score1] pts
Person B: [score2] pts
Person B is 1st

If tied:

Person A: [score1] pts
Person B: [score2] pts
Tied

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?

Sign Up