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.2 91.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.
To get the Solution, drop an email at [email protected]
Please feel free to send us your queries at: [email protected]