搜索资源列表
1
- 例:用筛选法求2~100之间的所有素数。 解:我们用下面的方法来解这题:先建立一个含有2~100之间所有自然数的数表,在数表中删去2的倍数(不包括2);然后找2后面第一个被保留的数p(是3),再删除p的倍数(不包括p);然后再找下一个被保留的数(是5),继续上述步骤:这样继续下去,直至P大于100为止。这样数表中剩下的数就是所要求的所有素数。这个求素数的方法称为爱拉托散(Eratosthenes)法。 -Example: Met
4_12primenumber
- 输入正整数i和n,由程序负责从i开始找起,连续找出n个素数并显示在屏幕上-Enter a positive integer i, n, the program is responsible From i started looking on, to find n consecutive primes and displayed on screen
sushu
- 找出一千以内的素数 并把它的结果输出来 有良好的界面-cha zhao sushu
a
- 1) 利用求n!的方法计算 2!+4!+5!的值。分别利用递归和非递归方法实现求n!。 2) 编写根据三条边求三角形面积的方法。利用该方法求以下两个三角形面积。 (1)三条边分别为:3,4,5 (2)三条边分别为:5.3, 6.2, 8 3)从命令行参数获取两个整数,找出两个整数之间的所有素数,每行输出3个数。-1) use the method seek n! 2!+4!+5! Value. Are recursive
ex6_19
- 从命令行参数获取两个整数,找出两个整数之间的所有素数,每行输出3个数。-From the command line parameters for two integers, find two integers all prime numbers between each line of the output number 3.
eladuosai
- 是一种从按照顺序排列的所有自然数中找出素数的方法-Is an order from all natural according to the number of ways to find prime numbers
456
- 插入一组数、时鲜用于计算素数的算法。假定我们要找出小于10的所有素数,其中共有2,3,4,5,6,7,8,9,10九个数,然后取走最小的数2并声明它就素数,然后筛掉2的倍数。重复上面的步骤直到空筛时,就可选出所有素数。-ruihiur heef bu vbuy bui buo bui bi bi bfuei buifwe buiw
find-prime-numbers
- 利用C语言实现从3-1000之间找出所有的素数,算法比较简洁-Just use the most simple C language to find all the prime numbers between 3 and 1000
qiusushu
- 找出素数规律,编程求出100到200以内的所有素数。-Find out the law of prime numbers, programming to calculate all the prime numbers less than 100-200.
shiyan
- 在main函数中调用函数fun(int[] a, int m),(其中m是在main中用键盘输入的小于100的整数),用fun 函数找出大于整数m,并且邻接m的5个素数,将这5个素数,用a数组接收,并在main中输出;(请根据题 目完成main和fun函数的编写)。int static fun(int[] a, int m)-In the main function calls the function fun, (
Magic-square
- 魔方阵 (1).设n是奇数,请编写程序构造n*n阶魔方阵,即行、列、两对角线上n个数之和相等的方阵。 (2).构造3*3素数魔方阵,即找出9个不大于500的素数并排成魔方阵。 -Magic square (1) n is an odd number, please write a program to construct n* n-order magic square that line, column the two di
14
- 算法功能:输入一个正整数,若其是素数,将其输出,否则,找出与其最邻近的素数,并输出这个素数。-Algorithm functions: enter a positive integer, if it is a prime number, output, otherwise identify their nearest prime number, and outputs the primes.
ETP
- 从键盘上输入一个数据,判断其奇偶性,若是偶数,将其分解为2个素数之和(例如:6=3+3,18=11+7,.......),若是奇数,判断其是否为素数,若是素数,找出其孪生素数(例如:5的孪生素数为3和7,11的孪生素数为13,.......)-A data input from the keyboard, determine the parity For even, be decomposed into the sum of two p
4_5
- 利用labview编写程序: 4、使用循环进行数组排序 要求:可以多次操作,直到点退出按钮。 5. 产生一个3×3的整数随机数数组,随机数要在0到100之间,然后找出数组的鞍点,即该位置上的元素在该行上最大,在该列上最小,也可能没有鞍点。如下图所示: 要求:加上数组元素数设置以及redo按钮重新取值计算 -Labview programming: 4, using a loop array sorting requi
RSA-CPP
- RSA算法非常简单,概述如下: 找两素数p和q 取n=p*q 取t=(p-1)*(q-1) 取任何一个数e,要求满足e<t并且e与t互素(就是最大公因数为1) 取d*e t==1 这样最终得到三个数: n d e 设消息为数M (M <n) 设c=(M**d) n就得到了加密后的消息c 设m=(c**e) n则 m == M,从而完成对c的实现-RSA algorithm is very simple, are summar
sushu
- 实现了素数的拆分和。只是很简单,没写麻烦的,复杂的可找我,-Realized primes splitting and. Very simply, I did not write cumbersome and complicated to find me, Oh
jisuanqi
- 1、创建一个计算器(非可视化界面),可以进行常用的加减乘除算术运算。 2、请找出3至1000范围内最大的10个素数,并计算出这10个素数的累加和。 3、使用简单if语句编程,从键盘键入三个整数,然后按照从小到大的顺序将其输出。 -1, create a calculator (non-visual interface) that can be used arithmetic arithmetic. 2, identify t
ShuJuJieGou-KeChengSheJi
- 产生两列随机数列:1.找出其中的素数2.将相同数转化为二进制输出3.统计相同数个数4合并两数列5.分别删除数列1中被2整除的数和删除数列2中被3整除的数-Generates two random number sequence: 1. Figure out where the primes 2 would be the same as the number into binary output 3. Statistical same n
find-prime-number
- 用C++语言找出1到1000内所有的素数,希望广大朋友的支持-With C++ language to find all primes within 1-1000, hope that the majority support of friends
5
- 1、一个判素数的函数,在主函数输入一个整数,输出是否为素数的信息。 2、输出杨辉三角前十行 3、十十五个数由大到小的顺序存放在一个数组,输入一个数,折半法找出该数是数组中的第几个,若不在,输出“无此数” 4、输出所有水仙花数(各位数字立方和等于本身) 5输出100以内的完数(一个数等于其因子之和) -1, a function of the number of sub-prime, an integer in the