#include "stdafx.h"
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include "time.h"
int _tmain(int argc, _TCHAR* argv[])
{
srand((int)time(NULL));
int i=0,sum=0,k=0,j=0,a=0,num=0,m=0;
for(i=1;i<101;i++)
{
k=rand();
(int)(k*1.0);
m=sqrt(k*1.0);
for(j=2;j<=m;j++)
{a=k%j;
if(a==0)
{break;}
if(j>m)
{num++;
sum=sum+k;}
}
}
printf("number is:%d\n",num);
printf("sum is:%d\n",sum);
return 0;
}