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;
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q17: What character(s) do you use to make
Q18: What conditional operator can be used to
Q19: In a switch statement, the keyword return
Q20: The if expression that precedes a block
Q21: What character(s) serve as the NOT operator
Q23: You write a program in which the
Q24: What kind of conditional operator requires three
Q25: What is the syntax of the conditional
Q26: What can be used in conjunction with
Q27: What are four of the most frequent
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents