home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!decwrl!sdd.hp.com!ux1.cso.uiuc.edu!news.cs.indiana.edu!babbage.ece.uc.edu!ucqais.cba.uc.edu!skilby
- From: skilby@ucqais.cba.uc.edu (Steven M. Kilby)
- Newsgroups: comp.sys.att
- Subject: float
- Message-ID: <1992Sep9.185432.15045@babbage.ece.uc.edu>
- Date: 9 Sep 92 18:55:06 GMT
- Sender: root@babbage.ece.uc.edu (Operator)
- Organization: University of Cincinnati, College of Business
- Lines: 26
- Originator: skilby@ucqais.cba.uc.edu
- Nntp-Posting-Host: ucqais.cba.uc.edu
-
-
- Could someone please clue me in to what I've screwed up below???
-
- #include <stdio.h>
- #include <math.h>
- float b,a ;
-
- float proc (a,b)
- {
- if (b == 1.000000) {return a;} else {return 2.000000 * a;};}
-
- main()
- {printf ("%f %f\n" , proc(2.000000,1.000000), proc(2.000000,3.000000));
- }
-
-
- Why wouldn't this print 2.000000 and 4.000000? I am running a 3B2 with
- Sys V R3.2 (its a 400 with MAU). Please respond by email.
-
-
- Thanks,
- Steve...
- --
- Steven M. Kilby..................Coordinator, Computer Information Systems
- University of Cincinnati................College of Business Administration
- (Steven.Kilby@UC.EDU or skilby@ucqais.cba.uc.edu) PHONE: (513) 556-7159
-