3 myInt
factor(myInt n
) {
22 d
= gcd((x
- sqrt(xx
)) % n
, n
);
28 cout
<< "couldn't find!" << endl
;
33 int main(int argc
, char *argv
[]) {
37 cerr
<< "usage: " << argv
[0] << " number_to_factorize" << endl
;
44 cout
<< n
<< ": is " << n
<< endl
;
48 cout
<< n
<< ": " << flush
;
51 cout
<< "is prime" << endl
;
57 cout
<< f
<< " " << flush
;