Ask Question
26 August, 13:59

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;

+4
Answers (1)
  1. 26 August, 14:11
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers