include

int main(void) {
int a,b,max,min,count,i,j;
scanf("%d %d",&a,&b);
if(a<b ) {
min=a;
max=b;}
if(b<a){
min=b;
max=a;
}
for(i=min;i<=max;i++){

for (j=1;j<=i;j++){

if(i % j==0 )
{
	count=count+1;
}
}
if (count==2) printf("%d \n",i);

count=0;

}

return 0;

}

  • created

    Feb '17
  • last reply

    Aug '17
  • 1

    reply

  • 1.2k

    views

  • 2

    users

6 months later

Suggested Topics

Topic Category Replies Views Activity
C and C++ 0 17 10d

Want to read more? Browse other topics in C and C++ or view latest topics.