Back to photostream

ScreenHunter_39 Aug. 21 09.53

github.com/FeetWetCoding/FeetWetCoding/blob/master/exerci...

 

// copyright (c) 2011 Robert Holder, Janice Dugger.

// See HELP.html included in this distribution.

 

#include

 

void WhileLoop3::runExercise()

{

int x=0, y=0; // = is pronounced GETS, == is pronounced EQUALS

int verticalstep=10, horizontalstep=15;

 

while ( x < 400 )

{

x += horizontalstep;

fwcLine(200, 0, x, 400, BLUE, 1);

fwcLine(200, 400, x, 0, RED, 1);

}

 

while ( y < 400 )

{

y += verticalstep;

fwcLine(0, 200, 400, y, GREEN, 1);

fwcLine(400, 200, 0, y, YELLOW, 1);

}

}

173 views
0 faves
0 comments
Uploaded on August 21, 2012
Taken on August 21, 2012