Skip to Content
Absolute Beginner's Guide to Programming, Third Edition
book

Absolute Beginner's Guide to Programming, Third Edition

by Greg Perry
November 2002
Beginner content levelBeginner
432 pages
11h 44m
English
Que
Content preview from Absolute Beginner's Guide to Programming, Third Edition

Other Forms of Decision Making

Most languages support additional kinds of decision-making statements. Virtually every language in existence uses the If statement as well as the Else option.

Table 8.1 lists three additional operators that work with the comparison operators you already know. These operators, called the logical operators, combine multiple decisions into one If statement.

Table 8.1. Logical Operators
Operator Use Description
And If (A > B) And (C < D) Produces a true result if both sides of the And are true. Therefore, A must be greater than B, And C must be less than D. Otherwise, the expression produces a false result.
Or If (A > B) Or (C < D) Produces a true result if either side of the Or is true. Therefore, A must be greater ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Absolute Beginner's Guide to Programming, Second Edition

Absolute Beginner's Guide to Programming, Second Edition

Greg Perry

Publisher Resources

ISBN: 0789729059Purchase book