online test c-v-t

#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的有几个?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值