With your basebot configured with a pen as in lab #1, write a C program that wil
ID: 3576509 • Letter: W
Question
With your basebot configured with a pen as in lab #1, write a C program that will draw a single equilateral triangle with side lengths of 24 inches. Fortunately, your lab partner remembered that you had written the following functions for a previous lab and so you are free to use them in this program. Forward(distance); // drive the robot forward distance inches Reverse(distance); // drive the robot backward distance inches Wait(ms); // have the program wait for ms milliseconds Right(angle); // have the robot turn right angle degrees Left(angle); //have the robot turn left angle degrees Halt(); // have the robot come to a complete Two hints showing some C syntax:Explanation / Answer
//assuming it's starting at bottom left vertex, facing upwards or north
Right(30);
Forward(24);
Right(120);
Forward(24);
Right(120);
Forward(24);
Halt();
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.