#include <stdio.h> int main(){ int m,n; scanf("%d%d",&m,&n); int count=1; int count1=0; int i,j,t; int temp; for(i=m;i<n;i++){ temp=i; t=0; while(temp>0){ t=t*10+temp%10; temp/=10; } if(t==i){//1 j=2; while(j<i){//2 if(i%j==0) break; else j++; }//2 if(j==i){//3 count1++; if(count1%6==0){//4 count1=1; printf("\n"); }//4 printf("%6d",i); }//3 }//1 } return 0; } |
Double click to view unformatted code.