Translate

Labels

Tuesday, 11 June 2013

PROGRAM TO GENERATE QUEER NUMBERS

main()
{
int i;
printf("The generated queer numbers:\n");
for(i=11;i<2000;i++)
if(queer(i)!=0)
printf("%d",queer(i));
printf("\n");
}



queer(int x)
{
int y;
if(((y=(x*x)%1000)!=0)&&((y%111)==0))
return x*x;
else
return 0;
}

OUTPUT:
The generated queer numbers:
1444   213444   289444   925444 1077444   2137444   2365444   3849444

No comments: