From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e99ea9c9d228f6b8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-16 20:49:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: Andrew Newsgroups: comp.lang.ada Subject: Re: interest computing problem Date: Tue, 16 Sep 2003 22:48:42 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en MIME-Version: 1.0 References: <3F6785FB.1090305@attbi.com> In-Reply-To: <3F6785FB.1090305@attbi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:42599 Date: 2003-09-16T22:48:42-05:00 List-Id: Robert I. Eachus wrote: > Andrew wrote: > >> New_Line; >> Put ("Your ending balance will be "); >> Put (Balance,1,2,0); > > > I think this will fix your problem, if I understand what you think is a > problem. If you want output in dollars and cents without exponents, > this will do it. Look at the documentation for Put in > Ada.Text_IO.Float_IO to understand why those numbers for the (otherwise > defaulted) parameters. > OOOOH yeah.. that sounds very familiar.. I wrote the program initally in 1997, and failed to properly document what things did and what they were for. here is the output for the program as it is now ============== How much money do you have-Please add cents? 1000.00 What is the interest you will receive? .02 How long will it be invested in weeks? 52 Your ending balance will be 1.00022E+03 ============ and the ending balance should be 1020.2008 or more nicely written 1020.20 but I will try the change as you suggest. .. .. .. .. ok bit of a problem . now it says the output (or final balance is) 1000.22 that is not good. and I had a friend who works at a local bank check the answer of 1020.2008 and he says that, that is the correct answer. any ideas? thanks in advance. Andrew