#include <stdio.h>
int main()
{
    int
l,u,i,j,prime;
   
printf("Enter Lower And Upper Limit=");
   
scanf("%d%d",&l,&u);
   
for(i=l;i<=u;i++)
    {
        prime=1;
       
for(j=2;j<i;j++)
        {
           
if(i%j==0)
            {
               
prime=0;
               
break;
            }
        }
           
if(prime==1)
            {
               
printf("%d\n",i);
            }
    }
    return 0;
}
0 comments:
Post a Comment