what is the program and the function for this question?

closed account (G187ko23)
A 5 letter word x is hidden in a string y such that the first two letters of x are the first two
letters of y and the third letter of x is the middle letter of y and the last two letters of x are the
last two letters of y. Note that y is any string with length greater than 5.
For example, the 10-letter string grabcefgat hides the 5-letter word great.
And the 7-letter string enatber hides the 5-letter word enter.
(a) Write a function called extract that takes a string as an input parameter and returns the
hidden word.
(b) Write a program that reads a string from the user and displays the hidden word extracted from the entered string using the function extract.
What do you have so far? What is the problems encountered?
We are here to help you, not to do your homework for you.
If a word has even number of letters then there are two middle letters in it.:)
Topic archived. No new replies allowed.