i know how to fix that "bug" you press ctrl z and reinitialize all the variables
Type: Posts; User: DUE IN 4 HOURS
i know how to fix that "bug" you press ctrl z and reinitialize all the variables
I wish, this is due in just under two hours and ive got a little more than an hour to work on it. i have no idea what the problem is i think i will have to skip class and get an excuse note somehow...
i removed the " = 0" from all my variables and i got this when i ran the program:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The local variable firstdenom may...
i added System.out.println(firstnum + " " + secondnum + " " + finalnum); to run after the error message and then input 2/3 + 1/3 which should produce an error because my calculator asks for 3...
int firstnum = 0; //first numerator
firstnum = Integer.parseInt(st1_sub2.nextToken());
this didn't do that?
I think I've already done what your saying I should do.
int firstnum = 0; //first numerator
firstnum = Integer.parseInt(st1_sub2.nextToken());
I don't think I understand what you are saying. If you could make the changes to my code and post your response that way it would be really helpful to me.
no this is a fraction calculator 2/3 + 1/3 + 1_2/3 not an integer calculator 1 + 2 + 3
if(finalint!=0 && finaldenom!=1 && finaldenom!=0 && finalint>0)
why are you saying if finalint is NOT 0 AND finalint is greater then 0.. its the same thing unless it goes negative. Try removing...
Whenever I input fractions I just get back my own error message, (the error message I send as System.err.println("There was an error in your input, try again."); ) or nothing at all. I think it might...