Menu

[solved] – Question 89758

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

Expert Answer


OR


Leave a Reply

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