View Code of Problem 27

#include <stdio.h>
int main(){
  int a,b;
  int i,j;
  while (scanf("%d%d",&a,&b) != EOF){
    for(i=a+1;i<b;i++){
      for(j=2;j<i;j++){
        while(i%j==0)
          break;
        if(j==i){
          printf("%d",i);
        
        }
      
      }
      
    
    }
    
  
  }

return 0;
}

Double click to view unformatted code.


Back to problem 27