Question: c + + Write a program that opens a text file to load a sequence of real values, separated by commas and whitespaces. You can

c++Write a program that opens a text file to load a sequence of real values, separated by commas and whitespaces. You can safely assume
that the number of real values in any of the files is less than or equal to 20. The program then sorts these values in the descending order,
and outputs the sorted numbers to another text file. The user only enters the input file name. An example input is
Input1.txt
The output file is always "output.txt". If the input file does not exist, the program then outputs File not found. and exits.
An example text file is as follows
91.2,103.2,72.4,-2,88.5,0,33.3,
The sorted values in the output should be
103.291.2,88.5,72.4,33.3,0,-2,
that is, each value is followed by a comma and a whitespace including the last value. without algorithim function
 c++Write a program that opens a text file to load a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!