(C++) Write a program to remove unnecessary blanks from a text file. Your program should read the text file and copy i

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

(C++) Write a program to remove unnecessary blanks from a text file. Your program should read the text file and copy i

Post by answerhappygod »

(C++) Write a program to remove unnecessary blanks from a text file. Your program should read the text file and copy it to another text file, but whenever more than one blank occurs consecutively, only one blank should be copied to the second file. The second file should be identical to the first file, except that all consecutive blanks have been replaced by a single blank.If the input file e.g. looked like this:
What a beautiful day! I wish I was at the beach... The output file should look like this:What a beautiful day! I wish I was at the beach…You need to have a plan for your program as well as the actual program code, input and output files. Planning your program can take the form of a flowchart, pseudocode, or notes to guide you in the development of the program.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply