Advertisement
calfred2808

vb using logical operator

Jun 23rd, 2012
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. Module Module1
  3.  
  4. Sub Main()
  5.  
  6. Dim username As String = Nothing
  7. Dim password As String = Nothing
  8.  
  9.  
  10. Console.WriteLine("Name: ")
  11. username = Console.ReadLine()
  12.  
  13. Console.WriteLine("Password: ")
  14. password = Console.ReadLine()
  15.  
  16.  
  17. If (username = "alfred" Or username = "tootsie") And password = "cancio" Then
  18. Console.WriteLine("Welcome " & username)
  19.  
  20. Else
  21. Console.WriteLine("Invalid username or password please trya gain")
  22.  
  23. End If
  24.  
  25.  
  26.  
  27. Console.ReadLine()
  28.  
  29. End Sub
  30.  
  31. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement