Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Espanol
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Espanol section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 9th, 2005, 01:37 AM
Registered User
 
Join Date: Apr 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to skoob
Default Please i need help with one of my codes

i making a program, to help me to count my money at work; i need to know how i can work with cash example:
wen i type a number in my prompt like this 69 i get the result like this .69000000000001 so i need to know how to get just .69 cents.
somebody can help me please

 
Old April 11th, 2005, 11:39 AM
Authorized User
 
Join Date: Feb 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rockyrak
Default

hi,

you haven't mentioned the datatype u have used to stored the amount. Anyway as far as i understood about the problem, it is a basic rounding problem. You can use round() function to round the value of cash u got as output.



Ram





Similar Threads
Thread Thread Starter Forum Replies Last Post
What these Codes Mean? phungleon Access VBA 1 November 14th, 2006 08:50 AM
Help for moto AT codes please. Mohammed C# 2 November 13th, 2006 05:00 AM
Need some more sample codes t.m.sundaram Visual Basic 2005 Basics 0 July 16th, 2006 08:16 AM
Help:needs codes GoGoagg All Other Wrox Books 3 June 30th, 2004 01:24 AM
How do I merge these two codes? stacy Classic ASP Databases 1 March 22nd, 2004 04:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.