www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/28/13:16:10

From: martin AT loplop DOT com (Martin Peach)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: sprintf and 64 bit integers
Date: Tue, 28 Jul 1998 16:48:13 GMT
Organization: Communications Accessibles Montreal, Quebec Canada
Lines: 8
Message-ID: <35bdff5f.3301382@nntp.hip.cam.org>
References: <msg316796 DOT thr-3d13781 DOT f625b AT online DOT tietokone DOT fi>
NNTP-Posting-Host: dialup-898.hip.cam.org
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

You could try dividing repeatedly by 1000 and sprinting out the
numbers separated by commas:
divide by 1000
print the whole part of the result followed by a comma, except the
last time.
Subtract the whole part multiplied by 1000 from the original number.
repeat.
Martin.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019