#include <stdio.h>
#include <string.h>
void caesar(char *s, int n)
{
while (*s) {
*s += n;
s++;
}
}
int main(void)
{
char s[] = "MOMOTARO";
caesar(s, 3);
puts(s);
return 0;
}
凯撒密码
最新推荐文章于 2022-03-09 12:37:54 发布
#include <stdio.h>
#include <string.h>
void caesar(char *s, int n)
{
while (*s) {
*s += n;
s++;
}
}
int main(void)
{
char s[] = "MOMOTARO";
caesar(s, 3);
puts(s);
return 0;
}