Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

I know I'm being lazy but...

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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:

CODE DELETED


[This message has been edited by Paul Wheaton (edited March 20, 2000).]
 
Trailboss
Posts: 23451
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Richard,
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 paulwheaton@yahoo.com
 
I need a new interior decorator. This tiny ad just painted every room in my house purple.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
    Bookmark Topic Watch Topic
  • New Topic