Last active
August 29, 2015 14:02
-
-
Save sspboyd/a6bef4ddd7976e6dbd87 to your computer and use it in GitHub Desktop.
quick sketch to figure out a general solution the rot_(5+3+8) email address type problem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
index 1 2 3 4 5 6 7 8 9 1011121314151617181920212223242526 | |
input a b c d e f g h i j k l m n o p q r s t u v w x y z | |
output k l m n o p q r s t u v w x y z a b c d e f g h i j | |
*/ | |
void setup() { | |
int range = 26; | |
int offset = 16; | |
for (int indx = 0; indx < range; indx++) { | |
int output = (indx + offset) % range; | |
println(indx + "%"+ offset + " = " + output); | |
} | |
} | |
void twoArray(){ | |
// show the super manual way of creating two arrays of 26 letters. One normal and one offset | |
} | |
void ifElseWay(){ | |
// show how to do it with an if/else statement | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment