Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void alphabet_make(const char * codeword, char * a) {
- bool was[27];
- for (int i=0;i<27;i++) was[i] = 0;
- while (*codeword!='\0') {
- was[*codeword-'a'] = 1;
- *a = *codeword;
- codeword++;
- a++;
- }
- for (char i='a';i<='z';i++) {
- if (!was[i-'a']) {
- *a = i;
- a++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment