Ask Question
23 June, 11:19

Write a statement that toggles the value of the bool variable onoffswitch. that is, if onoffswitch is false, its value is changed to true; if onoffswitch is true, its value is changed to false.

+2
Answers (1)
  1. 23 June, 12:35
    0
    You should state the language you're using in these types of questions; here's an example in C++.

    bool onOff = true;

    if (onOff)

    onOff = false;

    else

    onOff = true;
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Write a statement that toggles the value of the bool variable onoffswitch. that is, if onoffswitch is false, its value is changed to true; ...” 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