Search⌘ K

Challenge: Find the Person with the Highest Salary

Explore how to apply conditional statements in C++ to compare two given salaries. Learn how to write code that determines which person has the highest salary and prints the result. This lesson builds your understanding of decision-making in programming through a practical challenge.

Problem statement

In this challenge, you are provided with the salaries of two people. Your task is to find the person with the highest salary.

Input

We have already initialized the variables salary1 and salary2 at the backend.

...