How to add more functionality | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
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?

6th Aug 2022, 8:02 PM
koalakodes
koalakodes - avatar
1 ответ
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..
6th Aug 2022, 8:47 PM
Jayakrishna 🇮🇳