From: "Jason Yip" Newsgroups: comp.os.msdos.djgpp Subject: Why "c" is always zero?? Date: Sun, 5 Dec 1999 11:03:01 +0800 Organization: netteens.net (Hongkong Telecom IMS) Lines: 66 Message-ID: <82cko6$sfk$1@imsp026.netvigator.com> NNTP-Posting-Host: olkc10238.netvigator.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000A_01BF3F10.4C15FFC0" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. ------=_NextPart_000_000A_01BF3F10.4C15FFC0 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Can anyone tells me why the value of "c" is always equal to zero?? How can I correct this? Thanks a lot!! #include float ftc(n) int n; { float c, f; int i; for (i=3D0;i<=3Dn;i++){ c=3D5/9*(f-32); } return c; } main () { float c, f=3D0; int i=3D0; do { c=3Dftc(i); printf("\t\t F=3D%.2f \t\t C=3D%.2f\n",f,c); f++; i++; } while (i<=3D100); } ------=_NextPart_000_000A_01BF3F10.4C15FFC0 Content-Type: text/html; charset="big5" Content-Transfer-Encoding: quoted-printable
Can anyone tells me why the value of = "c" is=20 always equal to zero??
How can I correct this?
Thanks a lot!!
 
#include <stdio.h>
float=20 ftc(n)
int n;
{
float c, f; int=20 i;
 for (i=3D0;i<=3Dn;i++){
 c=3D5/9*(f-32)
;
     &= nbsp; =20 }
return c;
}
main ()
{
float c, f=3D0; int=20 i=3D0;
do
{
c=3Dftc(i);
printf("\t\t F=3D%.2f \t\t C=3D%.2f\n",f,c);
f++;
i++;
} while=20 (i<=3D100);
}
------=_NextPart_000_000A_01BF3F10.4C15FFC0--