#include <stdio.h> int main(){ int m,n; scanf("%d%d",m,n); int count=1; int count1=0; int t=0; int i,j,k; for(i=m;i<n;i++){ if(count==1) temp=i; while(temp>0){ t=t*10+temp%10; temp/=10; } if(t==i){ while(j<i){ if(i%j==0) break; else j++; } if(j==i){ count1++; if(count1%5==0){ count1=0; printf("\n"); } printf("%d",i); } } } return 0; } /* Main.c: In function 'main': Main.c:4:3: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=] scanf("%d%d",m,n); ^ Main.c:4:3: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int' [-Wformat=] Main.c:11:7: error: 'temp' undeclared (first use in this function) temp=i; ^ Main.c:11:7: note: each undeclared identifier is reported only once for each function it appears in Main.c:8:11: warning: unused variable 'k' [-Wunused-variable] int i,j,k; ^ */ |
Double click to view unformatted code.