Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!

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

Rich Nello
Greenhorn
Posts: 16
/***************************************************************************
*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
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 ...

Dirk Schreckmann
Sheriff
Posts: 7023
Moving this to the Swing / JFC / AWT forum...

Rich Nello
Greenhorn
Posts: 16
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 ]