Mathcad Prime 2.0 Also if statement
Mathcad Prime 2.0 Also if statement
(OP)
I am trying to write an if / also if statement program in Mathcad prime 2.0. I have 2 variables x and z and I want to return a "yes" value if BOTH are positive.
I have attached the Mathcad file, but it is not returning the right result. If one of the values is negative, I want it to give a "no" output.
Thank you in advance for your help.
Thanks,
I have attached the Mathcad file, but it is not returning the right result. If one of the values is negative, I want it to give a "no" output.
Thank you in advance for your help.
Thanks,
RE: Mathcad Prime 2.0 Also if statement
While I am no Mathcad whiz, I believe that the x and z constraints (>0)should be combined together in an "and".
The first time your program receives a positive response (second line, z>0) it exits the conditional restraints and provides a "yes".
RE: Mathcad Prime 2.0 Also if statement
here it is in Mathcad prime.
RE: Mathcad Prime 2.0 Also if statement
I attached a second (not recommended) way using "else if". Also, while not absolutely necessary in this case, I recommend using the return statement.