Syntax error with a calculator
Marsouth
-
ccm81 Posted messages 11033 Status Membre -
ccm81 Posted messages 11033 Status Membre -
Hello,
Configuration: Mac OS X (10.9.2) / Safari 7.0.2
I would like to set up a code so that if a number x is less than 3 then the calculator should calculate x squared minus 5, otherwise it should calculate 5 times x.
Here is my code
------------------------
Prompt X
If X<3
then X2-5
else Xx5
disp X
End
----------------------
Every time I try this it shows me "syntax error", I don't understand where the problem comes from.. if you could help me that would be great thanks in advance!
Configuration: Mac OS X (10.9.2) / Safari 7.0.2
I would like to set up a code so that if a number x is less than 3 then the calculator should calculate x squared minus 5, otherwise it should calculate 5 times x.
Here is my code
------------------------
Prompt X
If X<3
then X2-5
else Xx5
disp X
End
----------------------
Every time I try this it shows me "syntax error", I don't understand where the problem comes from.. if you could help me that would be great thanks in advance!