Search:

Type: Posts; User: why_always_me

Search: Search took 0.13 seconds.

  1. Replies
    11
    Views
    1,936

    Re: Java Calculator problems

    Hi yeah I forgot to change it to 10.

    I am now having the code give me the same answer for each equation the out put is:



    49+62*61-36
    15.666666666666668
    4/64
    15.666666666666668
  2. Replies
    11
    Views
    1,936

    Re: Java Calculator problems

    Hi I managed to get it working for one equation by moving the end bracket of the while statement to line 101.

    I am now getting the following error:
    Exception in thread "main"...
  3. Replies
    11
    Views
    1,936

    Re: Java Calculator problems

    Hi

    I have tried that and I am unable to find the reason for it just using the last token.

    Basically what happens is when I call the RPNtoDouble function I was printing the token that was being...
  4. Replies
    11
    Views
    1,936

    Re: Java Calculator problems

    sorry I added the description so it was clear what they should be.

    at the minute the input file contains only:
    49+62*61-36

    and the output should be
    49+62*61-36
    [49+62*61-36]
    3795
  5. Replies
    11
    Views
    1,936

    Re: Java Calculator problems

    Hi the program currently outputs:

    49+62*61-36
    [36]
    36.0

    whereas the program should be giving me

    equation read in
    49+62*61-36
  6. Replies
    11
    Views
    1,936

    Java Calculator problems

    Hi Everyone

    My code is an implementation of the shunting yard algorithm - Shunting-yard algorithm - Wikipedia, the free encyclopedia to convert infix expressions to postfix. I then try and solve...
Results 1 to 6 of 6