https://www.acmicpc.net/problem/1929
#include<stdio.h>
#include<math.h>
int main() {
int m,n;
scanf("%d %d",&m,&n);
for(int i=m;i<=n;i++){
int k=0;
if(i==1) k=1;
for(int j=2;j<=sqrt(i);j++){
if(i%j==0){
k=1;
break;
}
}
if(k==0) printf("%d\n",i);
}
}