programming

posted by .

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 don't 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)

Next
Dim input2 As String
For y As Integer = 0 To 4
Console.Write(" Please enter a password: ")
password(y) = Console.ReadLine()
input2 = password(y)

Next

Console.Write(" Please enter in your login ")
Console.Write(" User name ")
Console.ReadLine()
Console.Write(" Password ")
Console.ReadLine()

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Computer - Programming

    Please do help in providing solution to this question, thanks: Write a Fortran program that requests for three numbers from the keyboard, subtracts 48 from their sum and then divides the result by 6 before sending the output to the …
  2. computer science /use java language

    write the program that inputs a string representing a binary number(0s and 1s). First, your program should veerify that it is indeed a binary number, that is, the number contains only 0s and 1s . if that is not the case, your program …
  3. programming 2

    Write a program that inputs a word representing a binary number (0s and 1s). First, your program should verify that it is indeed a binary number, that is, the number contains only 0s and 1s. if that is not the case, your program should …
  4. Programming

    Write a program that would calculate and display the results for the multiplication table for values ranging from 1 to 100. Your program should print the output for each step and output a new line after 10 items. Provide your program …
  5. programming

    Write a program reads the city names and respective gas prices into 2 single-subscripted arrays in your program - one of type string, the other of type double. (We would call these "parallel arrays" - each corresponding location shows …
  6. C#

    Create three array of type double. Do a compile-time initialization and place 10 different values in tow of the arrays. Write a program to store the product of the two arrays in the third array. Produce a display using the MessageBox …
  7. programming

    a program displays the name of fruits that are sorted from the arrays(program that sort five names)
  8. computers - Programming

    Create a program that uses two parallel one-dimensional arrays. The program displays a shipping charge that is based on the number of items ordered by a customer. The shipping charge scale is shown in Figure 1 below. Store the maximum …
  9. CIS

    Create three arrays of type double. Do a compile-time initialization and place different values in two of the arrays. Write a program to store the product of the two arrays in the third array. Write a method to display the contents …
  10. Programming Java

    I am learning Java in programming right now. I need to write a program that should have an output like this: The program says "Type ten names". Then ten names sould be typed a person. Then the program chooses a random name from the …

More Similar Questions