0
How to add more functionality
https://code.sololearn.com/co5ksJ3qunxB/?ref=app There are two things that I want to implement. First, verifying the operator (+ - * /) is a valid input and if it isn’t one of those 4 it produces the error I typed up. The second is adding more functionality. In the sense where the user wants to use multiple integers. I have an idea of using arrays for this but thats where I’m at in terms of my learning path on sololearn. Is there another way or would arrays be the way to go?
1 Antwort
0
You can put into a do-while loop from line no:23
Declare sum before this:
And in cases use
sum = sum op (operation);
Continue until hasNext() not fails..
Hope it helps..