Write a program that reads data from file numbers.txt and process it. The file contains a series of numbers, each written on a separate line. The program should read the contents of the file into an array and then display the lowest, highest, total, and average of the numbers in the array. The program should have the following functions:
readNumbers. This function reads numbers from file and stores them in the array.
getLowest. This function finds the lowest value in the array and returns that value.
getHighest. This function finds the highest value in the array and returns that value.
getSum. This function calculates and returns the sum of the values in the array.
getAverage. This function calculates and returns the average of the values in the array.
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-59488.pdf
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment