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,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,19805810c471a6af X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-08 21:08:43 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn14feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail From: "SteveD" Newsgroups: comp.lang.ada References: <4bhy9.52855$T_3.627411@wagner.videotron.net> Subject: Re: Decimals after the point X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: NNTP-Posting-Host: 12.211.13.75 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc52.ops.asp.att.net 1036818522 12.211.13.75 (Sat, 09 Nov 2002 05:08:42 GMT) NNTP-Posting-Date: Sat, 09 Nov 2002 05:08:42 GMT Organization: AT&T Broadband Date: Sat, 09 Nov 2002 05:08:42 GMT Xref: archiver1.google.com comp.lang.ada:30621 Date: 2002-11-09T05:08:42+00:00 List-Id: "Genevieve B." wrote in message news:4bhy9.52855$T_3.627411@wagner.videotron.net... > Hi! > > For a project at university, there is a bonus that is to check for only 2 > decimals after the point in a float. > does anybody have an idea? > > I have an idea of putting my float into a string instead and then check for > the point...and then check for only 2 numbers after it... > I like your approach: Straightforward. Easy to understand. Easy to verify. Gets the job done. SteveD > Thank you > > >