Brand new to programming and working on some trig programs, specifically changing a complex number (1 - i) to trig form. The program works fine, unless a radical is entered in the "Request" dialog box (e.g., √3 -i) — then I get an error: "Missing "(" on the Request script line. I've tried putting the first "n" in parentheses but when syntax is checked, the software deletes them. Any thoughts appreciated.
Define LibPub CmplxParts()=
Prgm
:DelVar n,x,y,r,t
:Request "Enter equation",n
:x:=real(n)
:y:=imag(n)
:r:=√(x^(2)+y^(2))
:t:=angle(x+y*i)
:Disp "Conjugate = ",conj(n)
:Disp "Opposite = ",−1*n
:Disp "Magnitude= ",abs(n)
:Disp "Real Part x = ",real(n)
etc.