Ask Question
26 March, 17:46

Use a logical OR to write a more concise equivalent of the following code:

if (saleAmount > = 300)

cout << "Delivery available" << endl;

else

if (areaCode = = LOCAL_CODE)

cout << "Delivery available" << endl;

+2
Answers (1)
  1. 26 March, 21:01
    0
    if (saleAmount > = 300 || areaCode = = LOCAL_CODE)

    cout << "Delivery available" << endl;

    Explanation:

    || operator is known as the logical OR operator in C++. The logical OR operator returns True either one of the operands is True or both of them True. It returns false only when both of the operands are false. The above-written code will print Deliver available when the saleAmount is greater than or equal to 300 or the area code is equal to LOCAL_CODE.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Use a logical OR to write a more concise equivalent of the following code: if (saleAmount > = 300) cout ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers