22 lines
399 B
C
22 lines
399 B
C
#include <ctype.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#define ROT 13
|
|
|
|
int main(void) {
|
|
|
|
char text[] = "bonjour agentty, ras de notre cote egalement. over", base;
|
|
int i;
|
|
|
|
for (i = 0; text[i] != '\0'; ++i) {
|
|
if (isalpha(text[i])) {
|
|
base = islower(text[i]) ? 'a' : 'A';
|
|
text[i] = (text[i] - base + ROT) % 26 + base;
|
|
}
|
|
}
|
|
|
|
printf("%s", text);
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|