Create an array in vl with up to 100 elements call it


Create an array in VL with up to 100 elements, call it Username[100]

1. Use a For loop with K from 1 to 100

a. Input name

b. If (name != "LastName") Then

SET Username[k] = name

c.Else, exit loop.

//Notice that K has the last input in the array.

2. Do the following:

Prompt user for a name to check, or enter Stop to end, both in quotes.

Input name

IF (name != "Stop") THEN

For (L = 1; L <= K; L++)

IF (name == Username[L]) THEN

Write " Name " + name + " Is a match."

SET Flag = "TRUE"

ELSE

SET Flag = "FALSE"

END IF

END FOR

IF (Flag == "FALSE") THEN

Write "The name " + name + "Did not match."

END IF

END IF

WHILE name != "Stop"

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Create an array in vl with up to 100 elements call it
Reference No:- TGS01497452

Now Priced at $35 (50% Discount)

Recommended (90%)

Rated (4.3/5)