Skip to Main Content
John B. Coleman Library Ask A Librarian

COMP 1336 - Computer Science I: C++ Lessons: If Statements

Head of Reference and Information Services Department, Librarian II

If Statements

If Statements

Condition statement - structural component in programs that will execute a segment of code if the conditions in the statement are true.

If statement - a type of conditional statement that will execute code inside of it if the statement of the if statement is true. If statements can be extended with else and else if statements to have multiple conditions and multiple code segments.

See example below.

John B. Coleman Library
Mailing Address: P.O. Box 519, MS 1040, Prairie View, Texas 77446
Physical Address: L.W. Minor St. / University Drive, Prairie View, Texas 77446
Reference: (936) 261-1535, Circulation: (936) 261-1542
Email: askalibrarian@pvamu.edu

Library Hours