The LOCATE subroutine returns the 0-based index of the first occurrence of a character in a string.
For example:
LOCATE("Cyber Security", "e") would return 3LOCATE("Cyber Security", "S") would return 6target and phrase are variables used in the algorithm in Figure 1.
phrase ← "Cyber Security"
length ← 14
OUTPUT "Enter the character to find:"
target ← USERINPUT
Complete the pseudo-code statement to find the index of the first occurrence of the contents of target in phrase and store this index in the variable pos.
You must use the LOCATE subroutine in your answer.
pos ← _____