Professional Documents
Culture Documents
Control-Statemet 9 Ict
Control-Statemet 9 Ict
net
control statement
Group 2 presents 9- gemini
VB.NET Control Statements
In VB.NET, the control statements are the statements that
controls the execution of the program on the basis of the specified
condition. It is useful for determining whether a condition is true
or not. If the condition is true, a single or block of statement is
executed. In the control statement, we will use If Then, If Then
Else, If Then ElseIf, Select Case, Nested Select Case,
Flowchart of Control statements.
We can define more than one condition to be evaluated by the
program with statements. If the defined condition is true, the
statement or block executes according to the condition, and if the
condition is false, another statement is executed.
VB.NET provides the following conditional or
decision-making statements.
If (condition) Then
[Statement(s)]
End If
(Syntax)
If-Then Statement If (condition) Then
[Statement(s)]
End If
Example:
Dim age As Integer
age = 20
If age >= 18 Then
Console.WriteLine("You are eligible to vote.")
End If
If-Then Else Statement
The If-Then Statement can execute single or multiple
statements when the condition is true, but when the expression
evaluates to false, it does nothing. So, here comes the If-Then-
Else Statement. The IF-Then-Else Statement is telling
what If condition to do when if the statement is false, it
executes the Else statement.
If-Then Else Statement
Syntax:
If (Boolean_expression) Then
‘ This statement will execute if the Boolean condition is true
Else
'Optional statement will execute if the Boolean condition is false
End If
If-Then Else Statement
Example:
Dim num As Integer = 7
Start/End Symbols:
These symbols represent the beginning and end points of
the flowchart. In a VB.NET program, this corresponds to the
start and end of the main program or a specific subroutine or
function.
Process Symbols:
These symbols represent actions or operations
performed within the program, such as calculations,
assignments, or function calls.
Key Elements of Flowchart Control Statement
Decision Symbols:
These symbols represent points in the flowchart where
decisions are made based on conditions. In VB.NET, this
corresponds to If-Then-Else or Select Case statements.
Input/Output Symbols:
These symbols represent input and output
operations, such as reading data from the user or
displaying information to the user.
Key Elements of Flowchart Control Statement
Connector Symbols:
These symbols are used to connect
different parts of the flowchart and indicate the
flow of control from one step to another.
THANK
YOUGroup 2 presents 9-Gemini
Group Members And their
Questioner:
Leader: Role Stephanie Casiles
JohnCris A Sebastian
Roseleen Bisconde
Reporter:
Chloe Kyle Eneja
John Cris Sebastian
Rhian Rose Aguirre
Christine Jade Bueno
PPT Creator & Loptop Provider:
Dawn Eli Mar Ruiz
Czarina Michelle
John Patrick Altares
Norberte
Performance Task:
Zaira Mariano
John Karl Bayatan
John Cris Sebastian
Gian Andrei Tomas
Researcher:
Dave Ducusin
John Patrick Altares