Quiz+4-5

Quiz 4-5:

Declare an integer variable "L", write a function called "ReadLeft" that will turn the robot left and and read the value from a sonar sensor called "Sonic3" into the variable L. You also need to show me how to call the function ReadLeft from the main program.

Thanks

int L; //Declare the variable L//

 void ReadLeft  {  motor[motorB] = 50;  motor[motorC] = -50;  wait1Msec(600); Point turn left for .6 seconds

L = SensorValue(Sonic3); //the Sonar Sensor //

 }

 task main <span style="color: #0a00ff; font-family: 'Arial Black',Gadget,sans-serif;"> { <span style="color: #0a00ff; font-family: 'Arial Black',Gadget,sans-serif;"> ReadLeft; <span style="color: #008000; font-family: 'Arial Black',Gadget,sans-serif;">Make the function call to ReadLeft <span style="color: #0a00ff; font-family: 'Arial Black',Gadget,sans-serif;">}