Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int a,b,c,d,e=0,f=0,g=0;
- scanf("%d %d",&c,&d);
- for(a=c;a<=d;a++)
- {
- for(b=1;b<=a;b++)
- {
- if(a%b==0)
- {
- e++;
- }
- }
- if(e==2)
- {
- f+=a;
- g++;
- }
- e=0;
- }
- printf("%d %d\n",g,f);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement