Creator
Zj2tFQyYrMd6qyBmb73QaP0AKMW2
In sequence, Selectively (branch/making a choice), Repetitively (looping), By calling a function.
Relational operators have higher precedence than equality operators. Both are lower precedence than arithmetic operators.
> (Greater than), < (Less than), >= (Greater than or equal), <= (Less than or equal).
Floating-point numbers may not behave as expected due to precision issues (e.g., 3.0/7.0 + 2.0/7.0 + 2.0/7.0 might evaluate to 0.99999999999999989 instead of 1.0).
1) Determine the condition to make the decision. 2) Tell the computer what actions to take if the condition is true or false.
Space < ALL Digits < ALL uppercase letters < ALL lowercase letters.
The shorter string is considered less than the larger string.
It is executed only if the value of the logical expression is true. If false, the statement is bypassed, and the program proceeds to the next statement.
Decisions allow the program to perform different actions based on certain conditions.
Result is true (1) if at least one of Expression1 or Expression2 is true (nonzero); result is false (0) only if both are false (0).
A Boolean value that is either true or false.
The result depends on the machine's collating sequence (e.g., ASCII character set), comparing their numerical ASCII values.
If Expression is true (nonzero), result is false (0). If Expression is false (0), result is true (1).
() (Parentheses), ! (logical NOT), Arithmetic operators, Relational operators, Equality and inequality operators, Logical AND (&&), Logical OR (||).
`if (logical expression) statement;` (or a compound statement in curly braces).
! (not), && (and), || (or).
`if (logical expression) statement1; else statement2;` (statement1 for true, statement2 for false, or compound statements).
`true` has the value 1; `false` has the value 0.
Relational operators are evaluated from left to right. `0 <= num` evaluates to a Boolean (0 or 1), then that Boolean result is compared to `10`, which often leads to an unintended `true` result for numbers outside the desired range.
`bool`, `true`, and `false`.
An `else` is associated with the most recent `if` that has not already been paired with an `else`.
Result is true (1) only if both Expression1 and Expression2 are true (nonzero); otherwise, it's false (0).
Strings are compared character by character from left to right. Comparison continues until a mismatch is found or all characters are equal.
Selection and Repetition.
== (Equal, not for assignment!), != (Not equal).
They return an integer value of 1 if true, and 0 otherwise.