Imports System
Public Module Algorithms
Sub Main()
'Assignment()
'a value is given to a variable
Dim X As Integer
X = 7
'Sequence:
'a number of steps are performed, one after the other.
Console.WriteLine("Please add 10 to x")
'SEQUENCE
X += 10
X = X + 10
'Selection:
'under certain conditions some steps are performed, otherwise different (or no) steps are performed.
'If X = 10 Then
' Console.WriteLine("You Win!!!")
'Else
' Console.WriteLine("You Lose!!!")
'End If
If X = 10 Then
Console.WriteLine("You Win!!!")
ElseIf X = 5 Then
Console.WriteLine("Keep going")
Else
Console.WriteLine("You Lose!!!")
End If
'Repetition:
'a sequence of steps is performed a number of times.
'This is also known as iteration or looping.
Do While X < 50
Console.WriteLine(X)
'X += 1
X = X + 1
Loop
Console.ReadLine()
End Sub
End Module