How not to write a loop

Gerald Edgar gae at osupyr.UUCP
Thu Mar 10 23:36:07 AEST 1988


Lengthy discussion about loops such as:

>>> 	float x;
>>> 	for (x = 0; x < 20; x += .5) printf("%f\n", x);

How about this:

 	float x;
 	for (x = 0; x < 19.75; x += .5) printf("%f\n", x);

-- 
  Gerald A. Edgar                               TS1871 at OHSTVMA.bitnet
  Department of Mathematics                     gae at osupyr.UUCP
  The Ohio State University  ...{akgua,gatech,ihnp4,ulysses}!cbosgd!osupyr!gae
  Columbus, OH 43210                            70715,1324  CompuServe



More information about the Comp.lang.c mailing list