# to the nth power
Mark W. Schumann
catfood at NCoast.ORG
Tue Nov 6 11:14:47 AEST 1990
In article <5240 at ima.ima.isc.com> karl at ima.isc.com (Karl Heuer) writes:
> catfood at NCoast.ORG (Mark W. Schumann) writes:
>> int result = 1;
>> for (i = exponent; i > 1; i--) result *= root;
>Fencepost error. Should be "i > 0".
Uh, yes, that's right. Sorry, NetPeople.
--
============================================================
Mark W. Schumann 3111 Mapledale Avenue, Cleveland 44109 USA
Domain: catfood at ncoast.org
UUCP: ...!mailrus!usenet.ins.cwru.edu!ncoast!catfood
============================================================
More information about the Comp.lang.c
mailing list