Operations and Control Flow

Mithat Konar

Operations

Arithmetic operations

Basic arithmetic operators

Assignment

Variables on both sides of the assignment operator

Assignment operators

Increment/decrement operators

Precedence

Comparison operations

Logical operations

Operations on strings

Mixing strings with other types

Control flow

Sequence

Selection

if

if/else

nested if/else

First “game”: number guessing

Repetition

while

Improving the number guessing game

do…while

counter-controlled for

break and continue