Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Module Module1
- Sub Main()
- Dim lastnum As Double
- Dim taip As String
- Console.WriteLine("What number are u counting up to?")
- lastnum = Console.ReadLine()
- Console.WriteLine("Do u want odd or even numbers?")
- taip = Console.ReadLine()
- If taip = "even" Then
- For i = 2 To lastnum Step 2
- MsgBox(i)
- Next
- ElseIf taip = "odd" Then
- For i = 1 To lastnum Step 2
- MsgBox(i)
- Next
- End If
- 'Sub Main()
- ' Dim lastnum As Double
- ' Dim taip As Stri'ng
- ' Console.WriteLine("What number are u counting up to?")
- ' lastnum = Console.ReadLine()
- ' Console.WriteLine("Do u want odd or even numbers?")
- ' taip = Console.ReadLine'()
- ' If taip = "even" Then
- ' If lastnum Mod 2 = 0 Then
- ' For i = 1 To lastnum
- ' If i Mod 2 = 0 Then
- ' MsgBox('i)
- ' End 'If
- ' Ne'xt
- ' ElseIf lastnum Mod 2 <> 0 Then
- ' For i = 1 To lastnum
- ' If i Mod 2 = 0 Then
- ' MsgBox(i)
- ' End 'If
- ' Next
- ' End 'I'f
- ' ElseIf taip = "odd" Then
- ' If lastnum Mod 2 = 0 Then
- ' For i = 1 To lastnum
- ' If i Mod 2 <> 0 Then
- ' Console.WriteLine(i)
- ' Console.ReadKey()
- ' End 'If
- ' Next
- ' ElseIf lastnum Mod 2 <> 0 Then
- ' For i = 1 To lastnum
- ' If i Mod 2 <> 0 Then
- ' Console.WriteLine(i)
- ' Console.ReadKey()
- ' End 'If
- ' Next
- ' End 'If
- ' End If
- 'im num, cius As Double
- 'onsole.WriteLine()
- 'um = Console.ReadLine()
- 'ius = num Mod 2'
- 'onsole.WriteLine(cius)
- 'ConsoleReadKey()
- Console.ReadKey()
- End Sub
- End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement