This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

50 * 2 =100 / 2 =1 ?!!!!!

 
Rich Nello
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/***************************************************************************
*MY PROBLEM IS THIS!!
*BASICALLY IN AN EXAMPLE LIKE this simple multiplication ....
*
*50 * 2 = 100! ) Correct!
*
*HOWEVER ...
*WHEN I CONTINUE from 100 AND DIVIDE THAT BY 2, I GET 1!!! as an answer!!
*My calculator id dividing 2 by 2 instead of the answer (
*Any ideas what i'm missing??!?!? Coz i know it's in here somwhere!
*Thanks Guys! :roll:
**************************************************************************/
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ March 17, 2004: Message edited by: Dirk Schreckmann ]
 
Rich Nello
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry about that!
I just reread what I wrote and realized that I didn't really explain it at all!
So, here it goes:
This is an applet! But the problem is not with the applet or it's UI but rather with the displayed results! As metioned earier, i have a green(horn)-gut feeling that the problem is staring me in the face and as with tons of other situation in my life that have done the exact same thing ... I'm not getting it
this is a very simple calculator which I downloaded off the net! I am modifying if for some school work I need to hand in! I've done quite a bit, but this is a problem which I came across. It's calculating the correct answers (multiplication (mult), subtraction (minus) etc ...) BUT if i continue after that and as mentioned divde or multiply (or any thing else) it ignores my answer and works with the last inputted variable!
I can't seem to figure it out ...
Thank You in advance!!
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
Rich Nello
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rich Nello:
/***************************************************************************
*MY PROBLEM IS THIS!!
*BASICALLY IN AN EXAMPLE LIKE this simple multiplication ....
*
*50 * 2 = 100! ) Correct!
*
*HOWEVER ...
*WHEN I CONTINUE from 100 AND DIVIDE THAT BY 2, I GET 1!!! as an answer!!
*My calculator id dividing 2 by 2 instead of the answer (
*Any ideas what i'm missing??!?!? Coz i know it's in here somwhere!
*Thanks Guys! :roll:
**************************************************************************/
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ March 17, 2004: Message edited by: Dirk Schreckmann ]
 
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!