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.
.
.
Click on the title for the solution
.
.
if(onOffSwitch==true){
onOffSwitch = false;
}else{
onOffSwitch = true;
}
.
Click on the title for the solution
.
.
This is the answer:
:
if(onOffSwitch==true){
onOffSwitch = false;
}else{
onOffSwitch = true;
}
Comments
Post a Comment