View Code of Problem 27

include <stdio.h>
  int main(){
    int a,b;
    while(~scanf("%d %d",&a,&b)){
      int i,j,sum=0;
      for(i=a+1;i<b;i++){
        int k=0;
        for(j=2;j<sqrt(i);j++){
          if(i%j==0)
            k=1;
            break;
        }
      if(k==0) sum+=i;
      }
    printf("%d\n",sum);
    
    
    
    }
  
  
  
  }
/*
Main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
 include <stdio.h>
         ^
*/

Double click to view unformatted code.


Back to problem 27