I am asked to write a program in java that gets a line from the user (string) with real numbers (double) and arithmetic operations and (it might contain spaces) calculates the sum.
please enter your expression:
10.22 -2.22 +3.0
10.22 -2.22 +3.0=11.0
well, i thought about using split() with a regular expression but I don't find a suitable one.
would you help me please?