Since you ask the user to input the whole equation in one line this is easy. Don't parse anything out at first. Just take in all the data and stick it into a char buffer. Keep adding each character you read into the buffer until you get to a newline character. At that point, you know you've got the entire thing. Then, parse the numbers and operators out of that char array. strtok function may be helpful. And of course, you need atoi function to convert the ascii into real numbers like parseInt is doing for you now.
Firstly, sorry, that nope wasn't for this, my internet failed for a sec.
Secondly (I am so embarresed to say this), I kinda don't know how to do that? I can try, but i'm not an expert when it comes to manipulating data (I am so ashamed). I'll try to give you a prototype
Thirdly, no Robin, IDE 1.8.4 didn't work. I guess it's the code. Maybe i mistakenly pressed a key and bugged the whole thing. I don't have a clue at this point