10000≤a≤b≤99999),找出这两个数之间(包含这两个数本身)所有即是质数又是回文数的数
#include <iostream>
using namespace std;
int main(){
int a,b;
bool t = true;
cin>>a>>b;
int v,l,o,p;
bool first=true;
for(int i=a;i<=b;i++){
v = i/10000;
l = i%10000/1000;
o = i%100/10;
p = i%10;
if(v == p && l == o){
t = true;
for(int j=2;j<i;j++){
if(i%j==0){
t = false;
break;
}
}
if(t==true){
if(first == true){
cout << i;
first = false;
}else{
cout << " " << i;
}
}
}
}
return 0;
}