Write a free function getStat the gets a queue of integers, and calculates the highest and lowest numbers in the queue, as well as the sum of all of the integers in the queue. You may manipulate the original queue any way but upon completion of the function, the original queue must be restored to its original configuration. Use the queue operations defined in the queue class. Write a main function to test the code and please leave comments.
Sample output:
the original queue: 4 10 5 1 3 2 5 1 3 7
highest=10
lowest=1
sum is 41
the queue after calculations: 4 10 5 1 3 2 5 1 3 7
1
Expert's answer
2019-05-15T05:19:38-0400
Dear Chris, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Comments
Leave a comment