Question: 2 2 . 3 Filtering data Write a C + + program to 1 ) read the real - valued data from the input text
Filtering data
Write a C program to
read the realvalued data from the input text file called filexx where xx is a number
apply the following filter to the data
filteredoutput unfilteredinput
filteredoutputn filteredoutputn unfilteredinputn
print the original data and the filtered data into the output file called outputfilexx where xx is a number The following format should be used
HHH TTTTTTTT
where
HHH represents original data
TTTTTTTT represents the filtered data with decimal digits of precision.
Each entry should be separate by a single tab character t
For example, if the original data is
the output is
Observations:
the first data at index has no filter
the second data on the second column is from
filteredoutputn unfilteredinputn
the third data on the second column is from
filteredoutputn unfilteredinputn
this is what i have
#include
using namespace std;
Before submitting your code, do step and below
uncomment this part since zyBooks use it
int mainint argc, const char argv
if argc
std::cout hw inputFile outputFile" std::endl;
return EXITFAILURE;
string inputFileName argv;
string outputFileName argv;
uncomment above befofre submitting on zyBooks
Comment the next lines below
int mainvoid
string inputFileName "file; Do NOT change the name "inputFileName" since used above
string outputFileName "outputfile; Do NOT change the name "outputFileName" since used above
return ;
this is whats in chegs solutions, it won't open files
Could not find file: outputfile
Error opening files
Run command
aout file outputfile
Input
file outputfile
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
