文件名称:shiyan12
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:7.62kb
-
已下载: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/prime.cpp
shiyan12/prime.dsp
shiyan12/Debug
shiyan12/prime.plg
shiyan12
shiyan12/prime.ncb
shiyan12/prime.opt
shiyan12/prime.dsw
shiyan12/prime.dsp
shiyan12/Debug
shiyan12/prime.plg
shiyan12
shiyan12/prime.ncb
shiyan12/prime.opt
shiyan12/prime.dsw
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.