#include <stdio.h> main() { int sum=0,a,b,c; for(a=2;a<=100;a++) { c=0; for(b=2;b<a;b++) { if(a%b==0) { c=1; break; } } if(c==0) { printf("%d ",a); sum=sum+a; } } printf("\n%d",sum); getchar(); }