home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!psinntp!isc-newsserver!gmr6139
- From: gmr6139@ultb.isc.rit.edu (G.M. Richard )
- Subject: Help!!! Please Read this message!?!?!?!?!...
- Message-ID: <1992Sep8.002536.18118@ultb.isc.rit.edu>
- Originator: gmr6139@ultb
- Sender: news@ultb.isc.rit.edu (USENET News System)
- Nntp-Posting-Host: ultb-gw.isc.rit.edu
- Organization: Rochester Institute of Technology
- Date: Tue, 8 Sep 1992 00:25:36 GMT
- Lines: 34
-
- I can't get my compiler to do float-type variables. I can do
- integers, and I can declare integers, but I can't either
- declare a real number or define a float variable. This is no
- little typo here - the same programs work when compiled on a
- VAX, but when I compile this program with Turbo C, all I get
- is zeroes for floats. Take a look:
-
- /* Variable Example */
-
- #include <stdio.h>
-
- #define apples 4
- #define oranges 3.6
-
- main()
- {
- printf("\nApples = %d\nOranges = %f", apples, oranges);
- }
-
-
- output:
-
- Apples=4
- Oranges=0.000000
-
-
- Any help on this problem would be greatly appreciated!!!!
-
-
- --
- _ _ __ gmr6139@ultb.isc.rit.edu
- /| /| __ _/__/_ /__) ' __ /_ __ ,_ __/ gmr6139@george.cs.rit.edu
- / |/ |_/-/__/__/____/ \__/_/___/ /_/-/_/__/_/ gmr6139@ritvax.isc.rit.edu
- ____________________________________________ gmr6139@ritlav.isc.rit.edu
-