Problem:
Question: a)Assume that a data file, data.txt, contains the data for a checking account. Each line in the data file contains a character for deposit or check cashed ('D' or 'C'), and an amount that is represented as a double. Write a section of code that opens the data.txt input file, reads the data on each line in the file, and outputs the data to the terminal window.
b) Repeat this exercise but this time output each line of data to a new output file, checking.txt.
Write the code step by step and explain it.