Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main ()
- { int a,b,i,j,x
- scanf("%d%d",&a,&b);
- for (i=a;i<=b;i++)
- {
- int fleg=1;
- x=i;
- for (j=2;j<=x;j++)
- {
- if (x%j==0)
- fleg=0;
- break;
- }
- if (fleg==1)
- {
- printf("%d",x);
- }
- else
- {
- printf("X");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment