Back to photostream

ScreenHunter_42 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 WhileLoop4::runExercise()

{

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

int velocity= -45;

int rateofchange=1;

int horizontalstep = 12;

 

while ( x < 400 )

{

x += horizontalstep;

y += velocity;

velocity += rateofchange;

fwcCircle(x, y, 10, RED, 1);

fwcInt(velocity, x+10, y, BLUE, 10);

}

}

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