目前手頭上有個觸碰傳感器,有0和1兩個狀態(tài),我需要一個程序能讓它,碰一下進(jìn)行一個程序,再碰一下停止,求大神教教
1 回答
已采納

墨客莫科
TA貢獻(xiàn)2條經(jīng)驗 獲得超0個贊
bool?sta=true; int?input; while(cin>>input) { ????if(sta==true) ???????{ ??????????????do?something; ??????????????sta=false; ???????} ????else ????{ ????????????do?something; ????????????sta=true; ????}?? }
- 1 回答
- 0 關(guān)注
- 1243 瀏覽
添加回答
舉報
0/150
提交
取消