Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup() {
- Serial.begin(9600);
- randomSeed(analogRead(0));
- int factorOf12 = random(0,1024);
- int x=1;
- while(factorOf12 % 12 != 0) {
- factorOf12 = random(0,1024);
- x++;
- }
- Serial.print("Got: "); Serial.println(factorOf12);
- Serial.print("Took: "); Serial.print(x); Serial.println(" tries");
- }
- void loop() {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement