Robert Holder
ScreenHunter_49 Aug. 21 09.54
github.com/FeetWetCoding/FeetWetCoding/blob/master/exerci...
// copyright (c) 2011 Robert Holder, Janice Dugger.
// See HELP.html included in this distribution.
#include
// ==========================================
// = THIS IS THE SOLUTION CODE =
// = THIS IS *NOT* THE EXERCISE CODE =
// = (If you meant to look at the exercise =
// = it's in the directory above this one.) =
// ==========================================
void IfThen4_OYOSoln::runExercise()
{
int x=0, y=0;
int horizontalstep=50, verticalstep=50;
Color color = DARKBLUE;
int boxsize = 20;
for ( y = 0; y < 400; y += verticalstep )
{
for (x = 0; x < 400; x += horizontalstep )
{
boxsize = 200 - ((100-x/15) + (100-y/15));
fwcRectangle(x, y, boxsize, boxsize, color, 1, true);
}
}
}
ScreenHunter_49 Aug. 21 09.54
github.com/FeetWetCoding/FeetWetCoding/blob/master/exerci...
// copyright (c) 2011 Robert Holder, Janice Dugger.
// See HELP.html included in this distribution.
#include
// ==========================================
// = THIS IS THE SOLUTION CODE =
// = THIS IS *NOT* THE EXERCISE CODE =
// = (If you meant to look at the exercise =
// = it's in the directory above this one.) =
// ==========================================
void IfThen4_OYOSoln::runExercise()
{
int x=0, y=0;
int horizontalstep=50, verticalstep=50;
Color color = DARKBLUE;
int boxsize = 20;
for ( y = 0; y < 400; y += verticalstep )
{
for (x = 0; x < 400; x += horizontalstep )
{
boxsize = 200 - ((100-x/15) + (100-y/15));
fwcRectangle(x, y, boxsize, boxsize, color, 1, true);
}
}
}