#include <stdio.h>
long GetPrivateKey(long m,long e){
long k=1;
while(1){
k=k+1;
Type: Posts; User: szpengchao
#include <stdio.h>
long GetPrivateKey(long m,long e){
long k=1;
while(1){
k=k+1;
so i guess u mean, the algorithm is quicker for 2^n than other numbers with the same number of digits???
there is a question about making a program to find prime factorization.
And it says : " Your algorithm must be quicker for some types of numbers than for others of similar size"
i dont know...
n*m matrix
n<=10
m<=10
#include <stdio.h>
main(){
int ele,in,data[12],p,k;
printf("enter your value for prime p:");
scanf("%d",&p);
for(ele=1;ele<=p-1;ele++){
for(in=1;in<=p-1;in++){
...
maybe there is misunderstanding of the question.
i think, "in this way the distractions of performing real arithmetic accurately on the computer will be avoided." means p is a prime but not a...
but, how can u get rid of "the distractions of performing real arithmetic accurately"?
#include <stdio.h>
#include <math.h>
main(){
int a,b,p;
for(a=1;a<=p-1;a++){
printf("%d\t",a);
for(b=1;b<=p-1;b++){
if(a*b%p==1){
printf("%d\n",b);
see the attachment
http://cboard.cprogramming.com/attachment.php?attachmentid=8292&stc=1&d=1217262034