搜索资源列表
qiusushu
- 求任意自然数中素数的和,可以校验输入的数是否自然数,并显示出所有素数-seeking arbitrary natural number which primes and can check whether the number of imported natural number, and demonstrated that all prime numbers
fenjiezhiyinshu
- 软件简介: 你只需要输入一个大于2的数,就能自动判断这个数是否是素数,如果不是素数就自动分解质因数。-software descr iption : you only need to import a few of the more than 2, will automatically judge whether the number is prime, If not automatically prime factor decomposition quality.
fermat
- 实现素性检测。但不能实现太大的数,只能在小数范围内,而又不能完全确定就是素数,只能粗略估计。-achieve Primality Testing. But too few achieve, only in a minority within, and is not fully ascertained is the prime, only a rough estimate.
math
- 判断101-200之间有多少个素数,并输出所有素数。 1.程序分析:判断素数的方法:用一个数分别去除2到sqrt(这个数),如果能被整除, 则表明此数不是素数,反之是素数。
panduansushu
- 题目:判断101-200之间有多少个素数,并输出所有素数。 1.程序分析:判断素数的方法:用一个数分别去除2到sqrt(这个数),如果能被整除, 则表明此数不是素数,反之是素数。
ch5
- Status CreateSMatrix(RLSMatrix &M) { // 创建稀疏矩阵M int i Triple T Status k printf(\"请输入矩阵的行数,列数,非零元素数:\") scanf(\"%d,%d,%d\",&M.mu,&M.nu,&M.tu) M.data[0].i=0 // 为以下比较做准备 for(i=1 i<=M.tu i++) { do {
Sieve
- Sieve 是一个基于对话框的程序,使用了著名的Eratosthenes素数算法来计算2和所指定的数之间存在的素数的数量。是一个多线程应用程序。
C源代码实例
- 包含220个C语言的各种源程序:001 第一个C程序 002 运行多个源文件 003 求整数之积 004 比较实数大小 005 字符的输出 006 显示变量所占字节数 007 自增/自减运算 008 数列求和 009 乘法口诀表 010 猜数字游戏 011 模拟ATM(自动柜员机)界面 012 用一维数组统计学生成绩 013 用二维数组实现矩阵转置 014 求解二维数组的最大/最小元素 015 利用数组求前n个
WL40987330 C语言算法集
- 目录 第一部分 基础篇 001 第一个C程序 002 运行多个源文件 003 求整数之积 004 比较实数大小 005 字符的输出 006 显示变量所占字节数 007 自增/自减运算 008 数列求和 009 乘法口诀表 010&
编写一个判断一个数字是否是素数的函数
- 编写一个判断一个数字是否是素数的函数,利用该函数求200以内的素数之和。(素数指除了1和它本身之外,该数没有其他因子,例如101就是一个素数。)-Write a judge whether a number is prime function, using the function evaluation within 200 prime numbers. (In addition to a prime number, and it refers to itself, not the number
multithread
- 多线程的程序,求素数。用户运行程序时在命令行输入一个素数,然后程序创建一个独立新的线程来输出小于或等于用户所输入数的所有素数。-Multithreaded program, find the prime numbers. When users run the program on the command line enter a prime number, then the program creates a separate new thread to output less than or
pb
- 一些大学生PD实验的代码和设计。是一个学生信息管理系统,可以输入学生信息数据。以及求水仙花数,求素数之类的小程序-Some college PD code and design of experiments. Is a student information management system, students can enter data. And for a few daffodils, and prime numbers, such as applet
Demo
- 判断一个数是否为素数。用户输入一个自然数后,点击验证,会提示该数是否为素数。(Determine whether a number is a prime number. After a user enters a natural number, click verify to indicate whether the number is a prime number.)
mersenne_final
- 证明p=89、107、127、521、607、1279时Mp=2p-1是Mersenne素数,并打印出这些数的所有位数(It is proved that when p=89, 107, 127, 521, 607, 1279, Mp=2p-1 is the prime number of Mersenne, and all the digits of these numbers are printed ou)
字符串综合
- 素数对 统计单词数 反正很简单也很容易学 信息竞赛入门水题(A prime number is simple to count the number of words, and it's easy to learn the entry of information competition.)
常用函数
- 用筛法求素数的基本思想是:把从1开始的、某一范围内的正整数从小到大顺序排列, 1不是素数,首先把它筛掉。剩下的数中选择最小的数是素数,然后去掉它的倍数。依次类推,直到筛子为空时结束。如有: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1不是素数,去掉。剩下的数中2最小,是素数,去掉2的倍数,余下的数是: 3 5 7 9 11 13 15 17 19 21 23 25 2
判断素数
- 判断101-200之间有多少个素数,并输出所有素数。 1.程序分析:判断素数的方法:用一个数分别去除2到sqrt(这个数),如果能被整除, 则表明此数不是素数,反之是素数。(Determine how many primes are there between 101-200 and output all the prime numbers. 1. program analysis: the method of judging the prime number: 2 t
可逆素数
- 输入一个数判断该数是否是一个可逆素数,如果是输出**是可逆素数,否则为不是!(Enter a number to determine if the number is a reversible prime number. If it is output * is a reversible prime number, otherwise it is not!)
素数
- 通过C语言寻找素数的一个程序,可以判断并输出所输入的数当中的素数