Home > database >  Realistic prime number and a palindrome.
Realistic prime number and a palindrome.

Time:05-04

#include
#include
Int sushu b (int);
C int huiwen (int);
Int main ()
{int a;
For (a=100; a<1000; +)
{if (sushu (a) & amp; & Huiwen (a))
Printf (" % d \ n ", a);
}
return 0;
}
Int sushu (int b)
{int e, f;
E=SQRT (b);
For (f=2; F<=e; F++)
If (b % f==0)
return 0;
}
Int huiwen (int) c
{int g, h;
G=c/100;
H=c % 10;
If (g==h)
return 1;
return 0;

}


#include
#include
Int sushu b (int);
C int huiwen (int);
Int main ()
{int a;
For (a=100; a<1000; +)
{if (sushu (a) & amp; & Huiwen (a))
Printf (" % d \ n ", a);
}
return 0;
}
Int sushu (int b)
{int e, f;
E=SQRT (b);
For (f=2; F<=e; F++)
If (b % f!=0)
return 1;
}
Int huiwen (int) c
{int g, h;
G=c/100;
H=c % 10;
If (g==h)
return 1;
return 0;

}

Why run results would be different
  • Related