Өгөгдсөн натурал тоо анхны тоо ба палиндром тоо мөн үү?

‪#‎include‬ <stdio.h>
#include <conio.h>
void main ()
{int n,k=1,m,s=0;;
printf ("n=");
scanf ("%d",&n);
do k++; while ((k<=n/2)&&(n%k!=0));
m=n;
do { s=s*10+m_; m=m/10; } while (m);
if (n==s&&k>n/2) printf("%d too ni anhny too ba palindrom too mun",n);
else printf("%d too ni anhny too ba palindrom too bish",n);
getch();
}

Comments