文件名称:12
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
12. 编制具有如下原型的函数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均为奇数时才有可能成为所求的“数对”。
-12. The preparation of the prototype has the following functions 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 meet to find 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, but only when i and di are odd when they may become the order of a few of.
提示:i与d-i的和恰为偶数d,而且只有当i与d-i均为奇数时才有可能成为所求的“数对”。
-12. The preparation of the prototype has the following functions 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 meet to find 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, but only when i and di are odd when they may become the order of a few of.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
12.cpp