Count Up even or odd numbers in VB.NET
Source Code:-
Public Class Form1
Private Sub btnCount_Click(sender As Object, e As EventArgs) Handles btnCount.Click
Dim imax As Integer
Dim evenorodd As String
Dim x As Integer
imax = InputBox("How Number you want?")
evenorodd = InputBox("what number Want even or odd?")
If evenorodd = "even" Then
For x = 2 To imax Step 2
MsgBox(x)
Next
End If
If evenorodd = "odd" Then
For x = 1 To imax Step 2
MsgBox(x)
Next
End If
End Sub
End Class
VIDEO:-
Comments
Post a Comment