Advertisement
Guest User

Untitled

a guest
Jun 18th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. // tim so nguyen to trong khoang cho truoc
  2. #include<stdio.h>
  3. main(){
  4. int num1,num2,i,count=0,j;
  5. scanf("%d %d",&num1,&num2);
  6. for(i=num1;i<=num2;i++){
  7. count=0;
  8. for(j=1;j<=i;j++){
  9. if(i%j==0){
  10. count++;
  11. }
  12. }
  13. if(count==2) printf("%d ",i);
  14. }
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement