Group 1 One Way Selection Statement
Group 1 One Way Selection Statement
selection
Statements
By group 1
what is a
“one way selection statement”?
A one-way selection statement, often referred to as an "if statement," allows a program to make a decision based on a condition.
If the condition is true, a certain block of code is executed; otherwise, the program continues to the next section without executing
that block.
It represents a one-way flow of control. A one-way selection statement, often referred to as an "if statement," allows a program to
execute a block of code only if a specified condition is true. If the condition is false, the program simply continues to the next
sequential statement. It's a basic control flow structure in programming.
When we use the if condition, we pass the argument and if the argument will be satisfied then the respective code will be
executed otherwise nothing can happen.
The syntax of one-way selection is: The statement is executed if the value of the expression is true. The statement is bypassed if
the value is false; program goes to the next statement.
One-way selection
statement
A one-way selection statement, commonly
known as an "if statement" in computer science,
By Claudia Alves