...
/Solution Review: Find the Person with the Highest Salary
Solution Review: Find the Person with the Highest Salary
Let's see the detailed solution review of the challenge given in the previous lesson.
We'll cover the following...
Solution #
Run the code below and see the output!
Press + to interact
#include <iostream>using namespace std;int main() {// Initialize variable salary1 and salary2int salary1 = 56;int salary2 = 89;// if conditionif (salary1 > salary2) {// if bodycout << "person1";} else {// else bodycout << "person2";}// exitreturn 0;}
Explanation
Line No. 7 ...