|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
printf problem
I'm working with floats for calculations. I'm trying to use a printf statement to display the value of various floats, but I keep having problems. When I use %d, I get a wacky number over 37,000 which makes no sense. When I use %f, I get no output of the number at all. Could somebody tell me what I'm doing wrong. Here's an example of the format of how I'm doing my printf.
printf ("Value: %f /n", (float)value_name); I've tried it with %f and %d... as well as trying to use my variables as "double" as well. Same problems though. Any help would be very much appreciated. Thanks! |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming Problem: Extremely Frustrating | chantilly_team | Programming | 19 | 12-02-2005 23:00 |
| printf problem | cbolin | Programming | 4 | 09-11-2004 02:44 |
| Anyone with a replacement Printf? | Larry Barello | Programming | 5 | 19-03-2004 02:20 |
| The problem with scouting... | archiver | 2001 | 10 | 23-06-2002 23:49 |
| Major problem with chipphua motors | aka Scott White | Motors | 18 | 19-03-2002 19:44 |