#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c=0,d,f,g;
a=g=0;
scanf("%d",&b);
while(g!=5)
{
f=0;
for(d=2;d<1000;d++)
{if(b%d==0)
{f=1;break;}}
if(f=0)
{c=c+b;printf("%d/n",b);g+=1;}
b-=1;
}
printf("%d",c);
system("pause");
return 0;
}
|