Created
October 10, 2011 21:02
-
-
Save symtkn/1276532 to your computer and use it in GitHub Desktop.
C'de şifreleme(öteleme ile)
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
#include <stdio.h> | |
#define ROT 13 | |
int | |
main(void) | |
{ | |
int c, c_yeni; | |
while((c = getchar()) != EOF){ | |
if(c >= 'A' && c <= 'Z'){ | |
if((c_yeni = c + ROT) <= 'Z') | |
putchar(c_yeni); | |
else{ | |
c_yeni = c - ROT; | |
putchar(c_yeni); | |
} | |
} | |
else if(c >= 'a' && c <= 'z'){ | |
if((c_yeni = c + ROT) <= 'z') | |
putchar(c_yeni); | |
else{ | |
c_yeni = c - ROT; | |
putchar(c_yeni); | |
} | |
} | |
} | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment