Posted by vsu1 on Wednesday, September 9, 2009 at 12:51am.
write a program that maintains two parallel arrays. after th arrays have been loaded the program should behave as a login screen prompting for username and password. the program should respond three output messages. if username does not match one of the values in the username array, then the message should be "username not found". if the user name is found in the username array, but the password does not equal the parallel value in the password array then message should read "username and password do not match". if username is found and the password matches the message should read "access granted"
here is the code i have so far right now im stuck and not sure how to get the arrays to match up. I also dont know how to clear the screen after i have the username and passwords stored.
Dim user(0 To 4) As String
Dim password(0 To 4) As String
Dim input As String
For x As Integer = 0 To 4
Console.Write(" Please enter a username: ")
user(x) = Console.ReadLine()
input = user(x)
Dim input2 As String
For y As Integer = 0 To 4
Console.Write(" Please enter a password: ")
password(y) = Console.ReadLine()
input2 = password(y)
Console.Write(" Please enter in your login ")
Console.Write(" User name ")
Console.Write(" Password ")
Answer this Question
Programming - (i) What is binary tree (ii) Write a program to multiply any two ...
Programming - Write a pseudocode program that asks the user for an integer ...
programming - Write a program that asks for the length and width of two ...
Programming - Write a program that would calculate and display the results for ...
programming - I am having trouble writing this program for java. can anybody ...
C++ programming - write a program C++ program and Use a recursive function that ...
programming - How to write a program to create a class roster using an array? ...
Computer programming - problem: Write a program that accepts your first name ...
programming MIPS ask 3 - Write a MIPS assembly language program for the ...
programming - Write a C++ code to count the number of characters, words, and ...