random « prime « C Data Type Q&A

Home
C Data Type Q&A
1.binary
2.bit
3.byte
4.char
5.character
6.decimal
7.Development
8.float
9.hex
10.integer
11.prime
12.random
13.struct
C Data Type Q&A » prime » random 

1. Random number relatively prime to an input    stackoverflow.com

What's a computationally sane way to, given a natural number n, generate a random number that is relatively prime to n? I'm willing to sacrifice some randomness and coverage of all possibilities ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.