Examlex

Solved

Explain Why the Following Code Sample Does Not Capture the Intent

question 23

Essay

Explain why the following code sample does not capture the intent of the request "Make sure if the sales code is not 'A' or 'B', the customer gets a 10% discount".What is the correct if statement?
if(salesCode != 'A' || salesCode != 'B')
discount = 0.10;


Definitions:

Related Questions