Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

OUTPUT "Enter student's name"

INPUT target
//
// linear search the array for the target
//
FOR index <-- 0 TO LENGTH(students)-1
//
// extract the student's name and email address
//
strOut <-- ""
FOR strIndex <-- 0 TO LENGTH(students[arrayIndex])-1
IF students[arrayIndex][strIndex] <> '#' THEN
strOut <-- strOut & students[arrayIndex][strIndex]
ELSE
studentName <-- strOut
strOut <-- ""
ENDIF
NEXT strIndex
email <-- strOut
//
// output the student's data
//
OUTPUT studentName & " " & email
NEXT arrayIndex
//
ENDPROCEDURE

You might also like