"if p then q" is denoted as p → q.
~p denotes negation of p.
So inverse of above statement is ~p → ~q, and contrapositive is ~q →~p.
˄ denotes 'and'
˅ denotes 'or'
Chat with our AI personalities
There is no "elseif" statement in C. You can only use "else" and "if" separately. This is a good reason for switch/case/break.
In an if statement, the condition must be enclosed in parentheses.
A Ladderized If statement is a combination of If statements within one another. Ex: if (condition A) { if (condition B) { if(Condition C){ ..... } } }
if(condition) { statements /* ... */ }
The if statement.