Final answer:
To write a program in C++ that reads a sequence of numbers from a text file and outputs information about the sequence, you can use the fstream library for file input/output operations. Calculate the necessary information like the number of numbers, max/min number, average, median. Create a bar chart using asterisks based on the magnitude of the numbers.
Step-by-step explanation:
To write a program in C++ that reads a sequence of numbers from a text file and outputs information about the sequence, you can use the fstream library to handle file input/output operations. First, open the 'numbers.txt' file using an input file stream object. Then, you can read the numbers from the file and calculate the necessary information such as the number of numbers, max/min number, average, and median.
To create a bar chart using asterisks, you can use a loop to iterate over the values and print asterisks based on their magnitude. For example, if a number is in the range 0-10, you can print one asterisk, and for numbers in the range 11-19, print two asterisks, and so on. Finally, you can open the 'output.txt' file using an output file stream object and write the information and the bar chart to the file.