Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribedI 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 whole

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

=+ How does this differ from the Solow model?

Answered: 1 week ago