Conditional Statement

برنامه‌نویسی 2 views

Persian equivalent دستور شرطی

In plain language A conditional statement chooses what code to run based on a condition.

Short definition It selects a control-flow branch according to the result of evaluating one or more conditions.

Detailed explanation and example

If an order reaches a price threshold, a program can set shipping to zero. The else branch calculates the usual shipping charge.

Reference