Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

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 Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions

Question

1.2. What are some ways in which we express our identities?

Answered: 1 week ago