Initializacia

This commit is contained in:
Kozar 2024-10-02 18:58:16 +00:00
parent fdb278d71d
commit a61de64ccd

View File

@ -13,23 +13,22 @@ struct pizza {
char hacker_script(char l) { char hacker_script(char l) {
switch (l) { switch (l) {
case '0': return 'o'; case 'o': return '0';
case '1': return 'i'; case 'i': return '1';
case '2': return 'z'; case 'z': return '2';
case '3': return 'e'; case 'e': return '3';
case '4': return 'a'; case 'a': return '4';
case '5': return 's'; case 's': return '5';
case '6': return 'b'; case 'b': return '6';
case '7': return 't'; case 't': return '7';
case '8': return 'b'; case 'q': return '9';
case '9': return 'q'; default: return tolower(l);
default: return l;
} }
} }
void transform_to_hacker_script(const char *src, char *dest) { void transform_to_hacker_script(const char *src, char *dest) {
while (*src) { while (*src) {
*dest++ = hacker_script(*src++); *dest++ = hacker_script(tolower(*src++));
} }
*dest = '\0'; *dest = '\0';
} }