You are on page 1of 2

#include <iostream>

#include <fstream>
using namespace std;
ifstream f("atestat.in");
ofstream g("atestat.out");
struct punct
{int x,y;} v[10];
int n;
void afis_par()
{
int i;
for(i=1;i<=n;i++)
if (v[i].x%2==0) cout<<"("<<v[i].x<<","<<v[i].y<<") ";
}
int main()
{
int i;
f>>n;
for(i=1;i<=n;i++)
{
f>>v[i].x;
f>>v[i].y;
}
afis_par();
cout<<endl;

for(i=1;i<=n;i++)
if (v[i].x==v[i].y) g<<"("<<v[i].x<<","<<v[i].y<<")"<<endl;

f.close();
g.close();

return 0;
}

You might also like