TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Michael Stapleton
from: David Nugent
date: 1996-09-05 01:41:52
subject: Fixing decimal return

MS> If you want to print a float or double with 2 digits after the
 MS> decimal point use %f.2, like this:

Actually, it's "%.2f".


 MS> Beware!  It can be dangerous using float or double for money,
 MS> because of binary rounding errors.

S'ok - there's an old accountant's trick that works. You just create an
account for yourself, and throw in anything that doesn't balance in there
at the end of the day. You might get rich fast. :-)

--- MaltEd/2 1.0.b6
* Origin: Unique Computing Pty Limited (3:632/348)
SEEN-BY: 50/99 620/243 623/630 632/103 107 348 360 633/371 634/388 396
SEEN-BY: 635/301 502 503 506 544 639/252 711/401 409 410 413 430 808 809 932
SEEN-BY: 711/934 712/515 713/888 714/906 800/1
@PATH: 632/348 635/503 50/99 711/808 934

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™.