liuzeyu12a @ 2018-07-11 20:58:26
using namespace std;
int main()
{
char ch[50];
int array[50];
int a;
cin >> a;
cin>>ch;
int LEN = strlen(ch);
for (int i = 0; i < LEN; i++)
{
if (ch[i] != 'z')
array[i] = ch[i] + a;
else
array[i] = ch[i] - 25;
}
for (int j = 0; j < LEN; j++)
printf("%c", array[j]);
return 0;
}
by ComeOver· @ 2018-07-12 09:42:20
@liuzeyu12a
您赋一下初值试试