You are on page 1of 1

#include <iostream>

#include <fstream>
using namespace std;

int main()
{
int x, nr=0;
ifstream f ("numere.in");
while(f>>x)
{ int c=x;
int inv=0;
while(c!=0)
{
inv=inv*10+c%10;
c=c/10;
}
if (x==inv)
nr++;
}

cout<<nr;
return 0;
}

You might also like