sharim @ 2019-01-24 14:48:17
char a[55]; int main() { int i=0,n; scanf("%d",&n); getchar(); scanf("%[^\n]",a); while(a[i]!='\0') { if(a[i]+n>'z') { a[i]='a'+a[i]+n-'z'-1; } else { a[i]=a[i]+n; } i++; } printf("%s",a); }
by NKL丶 @ 2019-01-24 14:49:18
希望更丰富的展现?使用Markdown
by Ykimna @ 2019-01-24 14:57:29
希望更丰富的展现?使用Markdown
by 铃宕 @ 2019-01-24 14:58:33
include <stdio.h>
include<string.h>
char a[55];
int main() {
int i=0,n;
scanf("%d",&n);
getchar();
scanf("%[^\n]",a);
while(a[i]!='\0') {
if(a[i]+n>'z') {
a[i]='a'+a[i]+n-'z'-1;
} else {
a[i]=a[i]+n;
}
i++;
}
printf("%s",a);
}
by 铃宕 @ 2019-01-24 14:59:05
#include <stdio.h>
#include<string.h>
char a[55];
int main() {
int i=0,n;
scanf("%d",&n);
getchar();
scanf("%[^\n]",a);
while(a[i]!='\0') {
if(a[i]+n>'z') {
a[i]='a'+a[i]+n-'z'-1;
} else {
a[i]=a[i]+n;
}
i++;
}
printf("%s",a);
}
by ling21 @ 2019-01-25 20:26:21
我也是,不知道为什么