After the following code is executed what will be displayed on the screen? bool correntEmployee = true; double empSalary = 45000; if (correntEmployee) { if (empSalary < 45000) cout << "The employee needs a pay raise.\n"; else cout << "The employee pay rate is normal.\n"; } else cout << "This person is not an employee.\n";

Respuesta :

Answer:

"The employee pay rate is normal" is the correct answer for the above question.

Explanation:

  • The above question code is written in the c++ language, in which there is one variable of bool type whose value is true.
  • And this variable is also tested in the if-condition which gives the true and the if-body will be executed.
  • Then the internal if-condition will give the false result because the value of the empsalary is not less than 45000. It is because the above statement "empsalary=45000" will assign the value 45000 on the empsalary variable.
  • Then the else block will be executed which prints "the employee pay rate is normal".

ACCESS MORE
EDU ACCESS