#include<iostream>
using namespace std;
int main()
{
int a,b,x,r,y,s=0,n=0;
cin>>a>>b;
for(x=a;x<=b;x++)
{
r=0;
y=x;
while(y>0)
{
r=r*10+y%10;
y=y/10;
}
if(r==x)
{
s=s+x;
n++;
}
}
if(n==0) cout<<"nu exista palindroame";
else cout<<(float)s/n;
return 0;
}
|