【文件属性】:
文件名称:逻辑运算符-机器人知识
文件大小:2.33MB
文件格式:PPT
更新时间:2021-04-24 03:01:25
机器人
(3)逻辑运算符
|| && !
int temp; /*temp=表示温度*/
int rain; /*rain=表示下雨*/
if(temp<30&&rain!=1)
我上公园;
例:
int leftphoto;
int rightphoto;
if(leftphoto>120||rightphoto>150)
beep(); /*该函数完成鸣叫一声的功能*/