Question: C programming For the 2nd task, we want to write a program that completes the following requirements: a) Opens a file called salaries.txt for reading
For the 2nd task, we want to write a program that completes the following requirements: a) Opens a file called "salaries.txt" for reading b) Opens a file called "processed_data.txt" for writing c) Reads in four quarterly dollar salary payments from the infile d) Sums the quarterly payments e) Displays the total payment, as well as the average quarterly payment f) Writes the total payment and average quarterly payment to an outfile. It should print the text in a clean orderly format like so: Total Payments Made: XXXXX.XX Quarterly Average : XXX.XX (This can be done using the %lf precision options %n.mit". Lecture 5 slide 13) 9) Closes "salaries.txt" h) Closes "processed_data.txt
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
