Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //helloworld.c
- //Cinska polivka's first n00bish výtvor
- #include <string.h>
- #include <stdio.h>
- int main(int argc, char **argv)
- {
- char *arg = argv[1];
- //char b[] = "ahoj";
- char *p = arg;
- int i=0;
- int text;
- for(i=0; i < strlen(p); i++)
- {
- text = arg[i];
- if(text >= 'a' && text <= 'z')
- {
- text -= 84;
- text = text % 26 + 97;
- }
- else if(text >= 'A' && text <= 'Z')
- {
- text -= 52;
- text = text % 26 + 65;
- }
- printf("%c", (char)text);
- }
- printf("\n\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement