文件名称:shiyan12
- 所属分类:
- 数值算法/人工智能
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 883kb
- 下载次数:
- 0次
- 提 供 者:
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
编制具有如下原型的函数prime,用来判断整数n是否为素数:bool prime(int n) 而后编制主函数,任意输入一个大于4的偶数d,找出满足d=d1+d2的所有数对,其中要求d1与d2均为素数(通过调用prime来判断素数)。如偶数18可以分解为11+7以及13+5;而偶数80可以分解为:43+37、61+19、67+13、73+7。
提示:i与d-i的和恰为偶数d,而且只有当i与d-i均为奇数时才有可能成为所求的“数对”。
-Prepared with the following function prototype prime, used to determine whether an integer n prime numbers: bool prime (int n) before the preparation of the main function, indiscriminate importation of a greater than 4, even d, to find out to satisfy d = d1+ D2 all the number of , which calls for d1 and d2 are prime numbers (by calling the prime to determine prime numbers). If even 18 can be decomposed into 11+ 7 and 13+ 5 and even 80 can be decomposed into: 43+ 37,612 B! 19,672 B! 13,732 B! 7. Tip: i with di and exactly even d, and only when i and di are odd when they may become the order of a few of.
提示:i与d-i的和恰为偶数d,而且只有当i与d-i均为奇数时才有可能成为所求的“数对”。
-Prepared with the following function prototype prime, used to determine whether an integer n prime numbers: bool prime (int n) before the preparation of the main function, indiscriminate importation of a greater than 4, even d, to find out to satisfy d = d1+ D2 all the number of , which calls for d1 and d2 are prime numbers (by calling the prime to determine prime numbers). If even 18 can be decomposed into 11+ 7 and 13+ 5 and even 80 can be decomposed into: 43+ 37,612 B! 19,672 B! 13,732 B! 7. Tip: i with di and exactly even d, and only when i and di are odd when they may become the order of a few of.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
shiyan12
........\Debug
........\prime.cpp
........\prime.dsp
........\prime.dsw
........\prime.ncb
........\prime.opt
........\prime.plg
........\Debug
........\prime.cpp
........\prime.dsp
........\prime.dsw
........\prime.ncb
........\prime.opt
........\prime.plg