Created
May 14, 2017 14:53
-
-
Save rw-r-r-0644/6b79bd78cf04e7552bc4b632cd360761 to your computer and use it in GitHub Desktop.
1337 translator!
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define repl(a, b) if(str[i]==a)str[i]=b | |
int main(int argc, char *argv[]) | |
{ | |
char * str = calloc(strlen(argv[1] + 1), 1); | |
strcpy(str, argv[1]); | |
for (int i = 0; str[i]; i++) | |
{ | |
repl('a', '4'); | |
repl('e', '3'); | |
repl('i', '!'); | |
repl('o', '0'); | |
repl('g', '6'); | |
repl('s', '5'); | |
repl('t', '7'); | |
repl('z', '2'); | |
} | |
puts(str); | |
free(str); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment