#include<stdio.h> int main() { int m,n,count; int isprime(int m); printf("enter m and n(m<n):"); scanf("%d%d",&m,&n); count=0; for(m=m;m<=n;m++){ count=count+isprime(m); } printf("result=%d ",count); return 0; } int isprime(int m) { int i,result=0; for(i=2;i<=m/2;i++) if(m%i==0) break; if(i>m/2&&m!=1) result=m; return result; }