Luiz Carvalho
Luiz Carvalho

Reputation: 1419

How to make a logical implication condition?

I need create a conditional with a logical implication. I have four cases:

  if(true and true)
    #enter
  end

  if(true and false)
    #don't enter
  end

  if(false and true)
    #enter
  end

  if(false and false)
    #enter
  end

How I can make this?

Upvotes: 2

Views: 393

Answers (1)

Borodin
Borodin

Reputation: 126722

The expression a → b is the same as not a or b.

Is that what you want?

Upvotes: 3

Related Questions