[Ma...] Posted November 30, 2023 Share Posted November 30, 2023 Hello. I have a question. How can you write a condition in PCM that checks whether one number is greater than another. And if the assumption is true, it should give the number 1, and if it is false, then 0. Example: If 10>5, choose 1, and if not, then 0. Thank you for your help. Link to comment Share on other sites More sharing options...
[Da...] Posted November 30, 2023 Share Posted November 30, 2023 Please sign in to view this quote. Marek, you should find your answers here -> viewtopic.php?t=11962 Link to comment Share on other sites More sharing options...
[No...] Posted November 30, 2023 Share Posted November 30, 2023 The standard "beginners" construct goes like this: num1=5 num2=10 if num2 > num1 then res=1 else res=0 endif Note that it also returns 0 if both numbers are equal Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in