From: "Jason Yip" Newsgroups: comp.os.msdos.djgpp Subject: Whatever the input, the output is always 0 Date: Mon, 6 Dec 1999 20:47:28 +0800 Organization: netteens.net (Hongkong Telecom IMS) Lines: 18 Message-ID: <82gbc8$gq0$1@imsp026.netvigator.com> NNTP-Posting-Host: olkc10b161.netvigator.com 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 whatever I input, say 4.0 5.0, the output is always =0 . why?? pls tell me. thx.. #include #include double side (double a,double b) {return sqrt(pow(a,2)+pow(b,2));} main () {double a,b,s; printf("Enter the sides of the triangle: "); scanf("%lf%lf",a,b); s=side(a,b); printf("Hyotenuse: %.1f",s); }