#include <iostream>
void prime(int min, int max){
for(int i=min; i<max; i++){
if(i!=1 && (i==2 || i%2!=0) && (i==3 || i%3!=0 )){
std::cout << i <<"\n";
}
}
std::cout << "\n";
}
int main() {
int cases;
std::cin >> cases;
for(int i=0 ; i<cases; i++){
int min=0, max=0;
std::cin >> min;
std::cin >> max;
prime(min, max);
}
return 0;
}
why does my code, posted above, not pass the judging but can compile and execute fine on ideone.com? - http://ideone.com/4ixSBo