int i,a=0,t,m,n,p=m;scanf("%d\n",&t);while(t>0){scanf("%d %d \n",&m,&n);while(p>=m && p<=n){{for(i = 2;i<=p/2;i++){if((p%i)==0){a = 1;break;}}}if(a == 1)p++;else { printf("%d\n",p);p++; }} t--;}
What do you think is the value of p when your code enters the while loop?
p
while