Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I really just need some advice on how to gather the amount of numbers that are in the file. Not allowed to use an array.
I really just need some advice on how to gather the amount of numbers that are in the file. Not allowed to use an array. Thanks in advanced.
In this exercise you will be designing a program that does the following: Reads an unspecified number of integers from a sorted file of integers. (i.e., You don't know how many numbers are in the file, but you need to read them all.)The file name will be entered by the user. The program will display the following information: o How many numbers were read o The total sum of the numbers read o The average of the numbers read o The median value of the numbers read (The median is the middle number when the numbers are sorted by size.) A program run might look something like this: Enter file containing input values: in.txt Total values: 6 Sum: 344 Median: 59.50 Average: 57.33 Note: You may not use an array or any other aggregate structure to store all the numbers as a wholeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started