#include<fstream>
using namespace std;
main() {
ifstream infile;
ofstream outfile;
int num, pcount=0;
infile.open("numbers2.txt");
outfile.open("evennumbers.txt");
for(int count=0, count<20; count++) {
infile>>num;
if(num%2=0);
pcount++
}
outfile<<"number of positive num is "<<endl;
infile.close();
outfile.close();
system("pause");
}
elijah.gallien 0 Newbie Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.