Arsench - 5 months ago 44

C++ Question

I’m very new in C++ and I need your help. I want to use the input value as a mathematical function then print the result.

What i need is:

When user input: 2 +1 and hit Enter then output (cout>>)

should be your result is: 3 (the sum of 2 + 1)

The mathematical symbol could be + or * or / or -.

Could you please help me with some example?

Thanks in advance!