Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int i=2,j,n,r,c;
- printf("\n enter the range to be printed ");
- scanf("%d", &n);
- for(i=2;i<=n;i++)
- {
- c=0;
- for(j=1;j<=i;j++)
- {
- r=(i % j);
- if(r==0)
- {
- c++;
- }
- }
- if(c==2)
- {
- printf("\n %d",i);
- 1,1 Top
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement