📅  最后修改于: 2022-03-11 15:04:38.455000             🧑  作者: Mango
unsigned short n = 150;
unsigned short primeSum= 0;
unsigned short primecount=0;
unsigned short i, j ;
for (i = 2; i <= n; i++)
{
for (j = 2; j <= i ; ++j) {
if (i % j == 0) {
break;
}
}
if (j == 1)
primeSum+=i ;
primecount++;
}