int a; task main() { a=0; SetSensor(SENSOR_2,SENSOR_TOUCH); SetSensor(SENSOR_3,SENSOR_TOUCH); while (true) { OnFwd(OUT_A); Wait (10); Float(OUT_B); a=0; while ((SENSOR_3==0) && (SENSOR_2==0)); while (SENSOR_2==1) { if (a==0) { OnRev(OUT_B); Wait(10); OnRev(OUT_B); Wait(2); a=1; } else Off (OUT_B); }; while (SENSOR_3==1) { if (a==0) { OnFwd(OUT_B); Wait(10); a=1; } else Off (OUT_B); }; } } //end main