From: Darren Grant Newsgroups: comp.os.msdos.djgpp Subject: Re: simple thing Date: Thu, 16 Oct 1997 21:41:57 -0700 Organization: Vancouver Classic Video Games Club, http://www.vcvgc.bc.ca/ Lines: 9 Message-ID: <3446EC95.6229@vxl.imag.net> References: <34455CCF DOT 41C6 AT jcu DOT edu DOT au> Reply-To: darn AT merlin DOT imag DOT net NNTP-Posting-Host: turkey.imag.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Oon Lin wrote: > > printf("Vertical Retrace Time = %f \n", 1/70) ; "1" and "70" are both implicitly declared as ints above. It's just the way C works. You can get around this by explicitly casting the values as floats or doubles (recommended), or trailing the whole numbers with decimal points (e.g. "1." and "70." or even "1.0" and "70.0").