Răspuns:
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("date.in");
ofstream g("date.out");
int main()
{
int a,b,c;
f>>a>>b>>c;
if(a%2==0) cout<<a<<" "<<"PAR";
g<<a<<" "<<"PAR";
else if(a%2==1) cout<<a<<" "<<"IMPAR";
g<<a<<" "<<"IMPAR;
cout<<endl;
if(b%2==0) cout<<b<<" "<<"PAR";
g<<b<<" "<<"PAR";
else if(b%2==1) cout<<b<<" "<<"IMPAR";
g<<b<<" "<<"IMPAR;
cout<<endl;
if(c%2==0) cout<<c<<" "<<"PAR";
g<<c<<" "<<"PAR";
else if(c%2==1) cout<<c<<" "<<"IMPAR";
g<<c<<" "<<"IMPAR;
cout<<endl;
f.close();
g.close();
}
Explicație: