char aa[111]{}; int a = 0; cin >> aa >> a; 输出移位字符(aa, a); cout << aa;
[此贴子已经被作者于2020-3-12 11:13编辑过]
#include <stdio.h> #include <stdlib.h> int main(void) {int n=0;int count=0;int i=0; char a[50];char b[50]; scanf("%d",&n); //不接受n scanf("%s",a); for ( i=0;a[i];++i){ b[i]=a[i]+n; if(b[i]>('z')) {b[i]=(char)(b[i]-26);} printf("%c",b[i]);} }
[此贴子已经被作者于2020-3-12 20:35编辑过]