CyberSlug Rules!

Beginner Programming CMPS060

Prof. Paulo Franca

Home

Syllabus

Login

Objects

Download

Staff only

use repetition:

 

repeat 4 times:
draw a line of size whatever;
turn right;

 

void square(int whatever, int color=3)

{

for(int side=1;side<=4;side++)
{
line(whatever-1,color);
Tracer.right();
}

}