#include<iostream> using namespace std; int main() { int a,b,n,p,d,s=0; cout<<"a="; cin>>a; cout<<"b="; cin>>b; for(n=a;n<=b;n++) { p=1; for(d=2;d<=n/2;d++) if(n%d==0) p=0; if(p==1) s=s+n; } cout<<s; return 0; }