Post Reply 
QROOT Program creates Syntax Error
06-19-2024, 01:17 AM
Post: #2
RE: QROOT Program creates Syntax Error
(06-18-2024 07:49 PM)MullenJohn Wrote:  Help.

I just inputted the QROOTS program into my HP Prime Calculator.

The Program QROOTS

EXPORT QROOTS(A,B,C)
BEGIN
LOCAL D;
PRINT();
HComplex:=1;
D:=B^2-4*A*C;
IF D≥0 THEN
PRINT("Roots are real.");
ELSE
PRINT("Roots are complex.");
END;
PRINT((-B+√D)/(2*A));
PRINT((-B-√D)/(2*A)); END;

This is the error message I am getting "Syntax error in program line 8"

Would you know why? I have tried degugging but to no avail.

Cheers!

I copied and pasted your program into both the virtual Prime and physical Prime (G2). It worked fine on both.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: QROOT Program creates Syntax Error - toml_12953 - 06-19-2024 01:17 AM



User(s) browsing this thread: 2 Guest(s)