Did I translate the logical formula correctly into Pascal?

alt text

if (y div k=0)and not(x div k=0) then 

Or rather, on the contrary, did I correctly translate the expression in the pascal language into a logical formula?

  • I understand that I should replace the identity with an equal, so that the formula matches the code? - ololo
  • Type integer (slightly out of habit did not put a semicolon)) - ololo
  • Is it possible to simplify the formula? - Ololo
  • It seems that correct. Simplify - hardly - there are only 2 logical operators. - DelphiM0ZG
  • 2
    @drdaeman, I think that here denotes congruence, as in! [] ( upload.wikimedia.org/wikipedia/en/math/3/c/8/… ) - karmadro4

1 answer 1

If in the formula the identity (≡), instead of equality (=), then the situation depends on the types, and most likely reduces to false . :)

But I suspect that this is just such a perverted notation. If there is equality - yes, sort of like, right.