HEY GUYS I'M WORKING ON A CALCULATOR USING THE SCANNER CLASS. HOWEVER THERE IS A CATCH TO IT I CAN ONLY USE ADDITION AND SUBTRACTION TO CALCULATE ANSWERS. I HAVE TO MAKE IT INTERACTIVE AND ASK THE USER WHAT FUNCTION THEY WOULD LIKE TO DO(1.ADDITION,2.SUBTRACTION,3.DIVISION,4,MULTIPLICATION) I'M GOING TO USE A SWITCH CASE I WON'T HAVE ANY PROBLEM WITH THE ADDITION AND SUBTRACTION...BUT THE MULTIPLICATION AND DIVISION IS WHERE I'M GOING TO RUN INTO SOME PROBLEMS. FOR THOSE WHO DON'T GET WHAT I'M SAYING HERES AN EXAMPLE
mULTIPLICATION
2*2
2+2
3*4
4+4+4
DIVISION
20/4
20-4 = 16
20-4 = 12
20-4 = 8
20-4 = 4
SO THE ANSWER WOULD BE 5(COUNT HOW MANY TIMES I SUBTRACTED 4)
SO INSTEAD OF JUST HAVING LIKE THE ANSWER EQUAL SOMETHING LIKE NUM1*NUM2 I HAVE TO HAVE IT SETUP SO THE CODE WOULD HAVE THE ANSWER CALCULATED USING ADDITION INSTEAD OF JUST USING THE * OPERATOR. Could somebody give me some suggestions on how I would go about doing that. Only serious answers pleez no sarcasm.