TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Garth Douglass
from: Paul Edwards
date: 1996-08-30 00:53:54
subject: Fixing decimal return

GD> I was wondering if there is any way to fix the amount of decimal 
GD> places thata float returns. For instance if it was a price being returned, 
GD> to limit it toonly 2 decimal places. Any help with this would be very much 
GD> appricated.

When you're printing, you can go printf("%7.2f", floatvar);

I'd suggest you use an integer to store monetary values.  BFN.  Paul. 
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.