From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: Help scanf? Date: Sat, 01 Feb 1997 20:28:55 GMT Organization: Oxford University Lines: 20 Message-ID: <32f3a643.25054189@news.ox.ac.uk> References: <32f2a072 DOT 17736424 AT news DOT ionsys DOT com> NNTP-Posting-Host: mc31.merton.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On Sat, 01 Feb 1997 01:58:08 GMT, matrix AT ionsys DOT com (MCheu) wrote: >#include > >main() >{ > /* Declare */ > double a, b, c; ... > scanf("%f",&a); > scanf("%f",&b); > scanf("%f",&c); ... > return 0; >} You should either use floats instead of doubles, or %lf instead of %f. Doubles are more accurate and apparently faster than floats. George Foot