Arrays: Middle item
Given a set of data, output the middle item (if even number ofitems, output the two middle items).
Ex: If the input is 5 7 9 11 13 -1 (a negative indicates end),the output is:
9
Ex: If the input is 5 7 9 11 -1, the output is:
7 9
The maximum number of inputs for any test case will not exceed5. If the input exceeds this maximum, output “Too many inputs”.
Hint: Use an array of size 5. First read the data into an array.Then, based on the number of items, find the middle item(s).
Please provide code in Coral language
Expert
OR
PayPal Gateway not configured
OR
PayPal Gateway not configured
PayPal Gateway not configured
PayPal Gateway not configured