File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Cattle Drive and the fly likes I know I'm being lazy but... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Reply locked New topic

I know I'm being lazy but...

Richard Gibson

Joined: Mar 16, 2000
Posts: 9
with the following code for assignment 1.7 I get the following:
sum = 99.9999999999986
Just tell me to go to another forum or whatever (incidentally: should these questions come here or to Java Beginners? I'm all over the place :confused but...0.1 * 1000 = 100. I suppose the if statement is to show that in this case it isn't so...?
here is the code:


[This message has been edited by Paul Wheaton (edited March 20, 2000).]
paul wheaton

Joined: Dec 14, 1998
Posts: 20972

I deleted the code you posted because I don't want you giving away the answers to future cattle drive participants.
The code in assignment 1.7 is pretty easy. The hard part is the part you are struggling with now.
Why did it not add up?
This particular question is one that we need to cover by e-mail instead of here, so I'm going to lock this thread. Send me e-mail at

permaculture Wood Burning Stoves 2.0 - 4-DVD set
I agree. Here's the link:
subject: I know I'm being lazy but...
It's not a secret anymore!