Skip to Content
0
Former Member
Sep 11, 2007 at 11:15 AM

Add spaces in arithmetic expressions

48 Views

Hi experts,

i have to insert spaces in arithmetical expressions written by users.

For example:

INPUT (by USERS): A+B-SQRT(C)/(D**2)

OUTPUT (by Program): A + B - SQRT( C ) / ( D ** 2 )

Possible arithmetic operators are:

+; - ; *; /; **; SQRT()

Any hints will be rewarded.

Thanks in advance.

Fabio.