-
Find prime numbers prepared by screening the function: void sieve (bool isPrime...
编写筛选查找素数函数:
void sieve(bool isPrime[], int n)
其中isPrime[ ]为一个布尔型数组,n为数组大小。由于2是第一个素数,
所以设置isPrime[0]和isPrime[1]的值为false,并设置其余的元素初值为true。
然后对从4到n-1的每一个i,判断i是否能够被2整除,如果i能够被2整除,则设置isPrime[i]为false。
对从2到n/2的每一个可能的数值重复以上处理,当操作结束时,所有值为true的isPrime[i]所对应的i就是素数,它们将是从筛子中掉下来的。-Find prime numbers prepared by screening the function: void sieve (bool isPrime [], int n) which isPrime [] as a Boolean array, n is the size of the array. Because 2 is the first prime number, so set the isPrime [0], and isPrime [1] a value of false, and set the initial value of the remaining elements of true. And then from 4 to n-1 for each i, to determine whether i can be divisible by 2, if i can be divisible by 2, then set the isPrime [i] is false. From 2 to n/2 possible values for each one to repeat the above processing, when the operation ended, all the true value of the isPrime [i] corresponding to i is a prime number, they will be falling from the sieve in the past.
- 2023-03-02 04:45:03下载
- 积分:1
-
消息值,托管字符串,扰乱代码
消息值,托管字符串,扰乱代码-news value, the takeover string disrupt code
- 2022-01-22 02:32:53下载
- 积分:1
-
魔兽世界登陆器易语言第一版
界面不错
魔兽世界登陆器易语言第一版
界面不错 -World of Warcraft landers good easy interface language first edition
- 2022-03-20 03:41:43下载
- 积分:1
-
a system of data sample
八路数据采集系统
含有各个详细的子程序-a system of data sample
- 2023-08-13 12:00:02下载
- 积分:1
-
语音控制小车(基于凌阳61板)具有语音训练识别,控制小车的功能。...
语音控制小车(基于凌阳61板)具有语音训练识别,控制小车的功能。-Voice-controlled car (based on the Sunplus 61 board) has the voice training in the identification, control car functions.
- 2022-07-23 13:24:30下载
- 积分:1
-
嵌入式实时多任务操作系统培训教材,想学习嵌入式程序设计的同学们可以参考一下阿!...
嵌入式实时多任务操作系统培训教材,想学习嵌入式程序设计的同学们可以参考一下阿!-Embedded real-time multi-tasking operating system, training materials, want to learn the embedded programming students can refer to the Arab-Israeli!
- 2022-03-03 05:48:25下载
- 积分:1
-
restoring除法器设计
经典算法了,可以仿真通过
restoring除法器设计
经典算法了,可以仿真通过-divider restoring a classical algorithm design, simulation can be adopted
- 2023-01-21 00:50:03下载
- 积分:1
-
100M
100M-MAC-IPcore(从OPENCORE下载);-100M of the MAC
- 2023-02-17 12:05:04下载
- 积分:1
-
CCTV system, the ticket printing. Beginners to see other people do not look, a b...
闭路电视收费系统,票证打印用的。
给初学者看看,其它人就别看了,有点丑陋。。。。
初始密码123-CCTV system, the ticket printing. Beginners to see other people do not look, a bit ugly. . . . The initial password 123
- 2023-03-29 15:40:03下载
- 积分:1
-
This system is mainly to build a web
本系统主要构建一个网上物流平台,以让物流的物资准时,准确,无误的送达目的地。而在后台实现公司管理物流信息,以备货物无误差的配送,让顾客无忧的接收货物。
本系统实现前台实现公司方面的信息发布等,后台实现客户上门的需求录入,以及仓储的信息配送等功能。
-This system is mainly to build a web-based logistics platform in order to allow the logistics of materials on time, accurate and error-free destination. While in the background to achieve logistics information management to prepare error-free distribution of goods, so that customers receive worry-free goods. The system has realized front to achieve the company" s information release and so on, back-door needs to achieve customer input, as well as the storage of information distribution and other functions.
- 2022-03-17 16:43:53下载
- 积分:1