#include <iostream>
#include <stdio.h>
using namespace std;
int is_prime(int n)
{
int k,limit;
if(n == 2)
return 1;
if(n % 2 == 0)
return 0;
limit = n/2;
for(k=3; k <= limit; k+=2)
if(n % k == 0)
return 0;
return 1;
}
void main()
{
int sum = 0;
int i = 2;
while(i <51116)
{
if(is_prime(i) && i % 2 == 1)
{
sum += i;
}
++i;
}
cout<<sum;
system("pause");
}
/*
void main()
{
char str1[100] = "BCD";
char str2[100] = "AAAAAAAA";
int i = 0;
for(i = 1;i <= 4; i++)
{
memcpy(str2,str1,i);
printf("%s",str2);
}
cout<<endl;
system("pause");
}*/
/*void main()
{
int c;
char aa[] = "12345";
char *p = aa;
while(*p)
{
c = *p;
switch(c-'2')
{
case 0:
case 1:
putchar(c+4);
case 2:
putchar(c+4);
break;
case 3:
putchar(c+3);
break;
default:
putchar(c+2);
break;
}
p++;
}
printf("\n");
system("pause");
}*/
/*
void main()
{
int a = 0, x = 1, sum = 0;
while(1)
{
a = x * (x++) + 3;
if(a < 41383)
{
if (a % 7 == 0)
{
sum += a;
}
}
else
break;
}
cout<<sum<<endl;
system("pause");
}*/
/*
union
{
int x;
struct{
char a;
char b;
};
}u;
void main(void)
{
char c;
u.a = 1;
u.b = 2;
printf("0x%x\n",u.x);
cin>>c;
}*/
解释性语言是什么?都有哪些?
sql创建索引的目的?
26进制转8进制 如:OPDD
香农定理
unix系统是一个分时系统?实时系统?批处理系统?
判断素数的程序
712的很多次方中(最大值125434),后三位是696的有几个?