Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

C++ Clean up a mess. The last person in charge mixed the info from three different accounts into one file. Open that file and separate

C++ Clean up a mess. The last person in charge mixed the info from three different accounts into one file. Open that file and separate the data into 3 different files.

1. Ask user for name of data file

2. Open data file (if file does not open, print error message and return to step 1)

3. if file opened, read the first two lines of the file and remember them for step 5

4. Open 3 files (A.txt, B.txt, c.TXT)

5. Right the first two lines from the data file (step 3) into each new file.

6 Process mixed data. Next n lines of data file has format: Acct Number Amount withdraw/deposit Transaction code

7. Write data with account number 0-100 to A.txt, data with account number 101-200 to B.txt, and data with account number 201-300 in C.txt (include all data from line: account number, amount, withdraw/deposit, transaction code.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions