-
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
-
EasyD12 dynamic link library is the Microsoft Windows interface standards, popul...
EasyD12动态连接库是Microsoft Windows的接口标准,流行的软件开发工具VC、VB、VF、Delphi、C++ Builder、Power Builder 等均可使用。用户可以选用自己喜爱的工具轻松搞定USB开发。其中包含2个版本DLL,根据情况自己选择。-EasyD12 dynamic link library is the Microsoft Windows interface standards, popular software development tools VC, VB, VF, Delphi, C Builder, Power Builder, etc. may be used. Users can choose their favorite tools easy to get USB development. Which contains two versions of DLL, according to the situation of their choice.
- 2022-11-19 09:25:03下载
- 积分:1
-
液晶显示测试程序
液晶显示测试程序
液晶显示测试程序
液晶显示测试程序
-LCD liquid crystal display test procedure test procedures
- 2023-01-18 16:55:03下载
- 积分:1
-
统计输入文件的行数、空格数、元音字母数、辅音字母数、非空白字母数、非空的行数...
统计输入文件的行数、空格数、元音字母数、辅音字母数、非空白字母数、非空的行数-statistical inputs the line a few, a few spaces, a few vowel and consonant few letters, a few non-blank letters, non-empty rows
- 2022-08-14 20:10:44下载
- 积分:1
-
TCL2543电压表中的应用,能通讯的测量表,内存的分配
TCL2543电压表中的应用,能通讯的测量表,内存的分配-TCL2543 voltage meter application that can communicate measurement tables, memory allocation
- 2022-03-10 12:48:00下载
- 积分:1
-
这是一个对工作人员监控的很好的软件,当人不在时候,能够很好的监控人员!...
这是一个对工作人员监控的很好的软件,当人不在时候,能够很好的监控人员!-this is a work of good staff monitoring software, when a person is not, to monitor personnel good!
- 2022-08-24 05:24:59下载
- 积分:1
-
操作系统实验,编程实现进程的调度,基于时间便轮转的算法!...
操作系统实验,编程实现进程的调度,基于时间便轮转的算法!-Operating system, experiment, programming process, scheduling, time-based rotation algorithm will be!
- 2023-05-06 09:05:08下载
- 积分:1
-
This is VC++ Some of the shortcut keys, in the hope that useful
这是VC++中的一些快捷键,希望对大家有用-This is VC++ Some of the shortcut keys, in the hope that useful
- 2022-04-01 06:48:00下载
- 积分:1
-
用锁文件实现进程通信
用锁文件实现进程通信-lock document to achieve communication proce
- 2022-05-21 20:36:29下载
- 积分:1
-
用vb实现快速傅立叶变换,运行速度达到最优化,可以c代码媲美,因此可以实现实时傅立叶变换。实现模块化,直接作为一个模块调用即可,非常方便!...
用vb实现快速傅立叶变换,运行速度达到最优化,可以c代码媲美,因此可以实现实时傅立叶变换。实现模块化,直接作为一个模块调用即可,非常方便!-with vb fast Fourier transform, speed of operation to achieve the most optimized code can be comparable to c, it can achieve real-time Fourier transform. To achieve modular, as a direct call modules can be very convenient!
- 2022-03-22 07:18:51下载
- 积分:1