#include<iostream> #include<fstream> using namespace std; int addnum( ifstream &
ID: 661580 • Letter: #
Question
#include<iostream>
#include<fstream>
using namespace std;
int addnum( ifstream & in, ofstream & out)
{
int counter;
while(!in.eof())
{
in>>counter;
counter++;
out<<counter;
}
}
int main()
{
char inputfile[300]="zzin1.dat";
char outputfile[300]="acdc1.dat";
ifstream f1;
f1.open(inputfile);
ofstream f2;
f2.open(outputfile);
addnum(f1,f2);
return(0);
Explanation / Answer
Pseudo Code:
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.