Sunday, 1 September 2013

Can't understand error in this program for checking automorphic no.?

Can't understand error in this program for checking automorphic no.?

int a=0, b, c, e, n=25;
e=n;
while(n!=0)
{
n=n/10;
a++;
}
printf("%d",a);
b=e*e;
c=b%(pow(10,a));
if(c==e)
printf("automorphic");
For the line c=b%(pow(10,a)); compiler shows a error -"invalid operands of
types int' anddouble' to binary `operator%' "

No comments:

Post a Comment