Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void func(void) {
- char texte[] = "Ca change seulement les lettres";
- int i = 0;
- int k = 4;
- while (texte[i]) {
- char c = texte[i];
- if (c >= 'a' && c <= 'z') {
- c = c - 'a';
- c = (c + k) % 26;
- c = c + 'a';
- texte[i] = c;
- } else if (c >= 'A' && c <= 'Z') {
- c = c - 'A';
- c = (c + k) % 26;
- c = c + 'A';
- texte[i] = c;
- }
- i++;
- }
- printf("%s\n", texte);
- }
Add Comment
Please, Sign In to add comment