Dr. CooCoo has a way of focusing on an array. She does this by taking only the middle 3 elements of an array.
You have to help her focus on the array now.
Write a method Met that takes in an integer array and returns the focussed array.
The given array will always have an odd length and have minimum 3 elements.
Don’t write the Class and main method - assume they are already there.
Example Input: 6 7 8 9 10
Output: 7 8 9
Example Input: 2 3 4
Output: 2 3 4
Answers
Answered by
2
Answer:
question is very lengthy
Explanation:
Dr. CooCoo has a way of focusing on an array. She does this by taking only the middle 3 elements of an array.
You have to help her focus on the array now.
Write a method Met that takes in an integer array and returns the focussed array.
The given array will always have an odd length and have minimum 3 elements.
Don’t write the Class and main method - assume they are already there.
Example Input: 6 7 8 9 10
Output: 7 8 9
Example Input: 2 3 4
Output: 2 3 4
Similar questions
Biology,
5 months ago
Math,
5 months ago
Math,
5 months ago
Math,
1 year ago
India Languages,
1 year ago