Course Solutions Uncategorized (Solved) : Arrays Middle Item Given Set Data Output Middle Item Even Number Items Output Two Middle I Q37664306 . . . .

(Solved) : Arrays Middle Item Given Set Data Output Middle Item Even Number Items Output Two Middle I Q37664306 . . . .

 

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

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post