Or VBS, Jscript, etc... something this simple could be done in most anything but this is a learning exercise AFAIK. =)

Z-

Just realized in the second example I missed a counter init value & a increment step. Cosmetic but wanted to clarify.

Bryan Seitz wrote:
And for doing simple things like this, I prefer perl :)

On Sun, Feb 26, 2006 at 10:52:04AM -0500, warpmedia wrote:
Hey Z, been a bit since I've done C, so be gentle if this is wrong as I did not try running it...

You may want to consider second example using do..while gallons > 0 loop as the better method when n is not known.

Reply via email to