Problem

In this exercise, you modify the program from TRY THIS Exercise 17. If necessary, create...

In this exercise, you modify the program from TRY THIS Exercise 17. If necessary, create a new project named ModifyThis18 Project. Copy the instructions from the TryThis17.cpp file into a source file named Modifilhis18.cpp. Change the filename in the first comment to ModifyThis18.cpp. Also change the name of the sequential access file in the open function to ModifyThis18.txt. Modify the program so that each record contains an additional field: the cube of the number in the first field. For example, the first record should contain the number 10, the '# ' character, the number 100, the '# ' character, and the number 1000. Save and then run the program. Verify that the program worked correctly by opening the ModifyThis18.txt file in a text editor. Close the ModifyThisl8.txt file.

Reference: Exercise 17:

If necessary create a new project named TryThis17 Project. Also create a new source file named TryThis17.cpp. Write a program that save records to a sequential access file named TryThis17.txt. Each record should contain two fields separated by the '#' character. The first field should contain numbers from 10 through 25. The second field should contain the square of the number in the first field. For example, the first record will contain the number 10, the its character, and the number 100. Save and then run the program. Verify that the program worked correctly by opening the TryThis17.txt file in a text editor. Close the TryThis 17.txt file. (The answers to TRY THIS Exercises are located at the end of the chapter.)

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT