Control Statements CSI 3125, Preliminaries, page 1
Control Statements • to control the flow of execution of program • control statements can be put into the following categories: selection, iteration, and jump. • Selection statements allow program to choose different paths of execution • Iteration statements enable program execution to repeat one or more statements. • Jump statements allow program to execute in a nonlinear fashion. CSI 3125, Preliminaries, page 2
Selection Statements • • If statement if else statement nested statement if –else-if ladder CSI 3125, Preliminaries, page 3