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-17 09:33:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.stueberl.de!newsr1.ipcore.viaginterkom.de!btnet-peer1!btnet-feed3!newreader.ukcore.bt.net!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada Subject: Re: interest computing problem Date: Wed, 17 Sep 2003 16:32:49 +0000 (UTC) Organization: BT Openworld Message-ID: References: NNTP-Posting-Host: host81-129-106-87.in-addr.btopenworld.com X-Trace: sparta.btinternet.com 1063816369 4809 81.129.106.87 (17 Sep 2003 16:32:49 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Wed, 17 Sep 2003 16:32:49 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MSMail-Priority: Normal X-Priority: 3 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:42621 Date: 2003-09-17T16:32:49+00:00 List-Id: "Andrew" wrote in message news:vmh1jlmbuvrb8f@corp.supernews.com... > ok after a few hours of sleep.. I got Long_Float to work(aka the program > compiled), but the input/output that I got is still > > 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 1000.20 > > > as you can see it now says that the ending balance is 1000.20 which is > changed from 1000.22 (and the can probably be attributed to the fact > that I am using Long_Float instead of Float). but I am still at the > problem of the answer should be 1020.20 (or the full answer that he came You input ".02" which you are then dividing by 100 to get a percentage, so your "bank" is paying 0.0002% - I'd say 20cents is about right at that rate! Try your same program but enter "2.0" (miss quotation marks) for the second value and you will get the result "1020.14" - which is a lot closer...