这个错哪了?自己测试一点问题都没有,结果全wa了
查看原帖
这个错哪了?自己测试一点问题都没有,结果全wa了
1128533
kfxjtr楼主2023/10/21 11:15
#include<iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	char s[50];
	int j=0;
	getchar();
	while((s[j]=getchar())!='\n')
	  {
	  	s[j]+=n;
	  	while(s[j]<97||s[j]>122)
	  	  {
	  	  	s[j]=s[j]-122+96;
		  }
		j++;
	  }
	for(int i=0;i<=j;i++)
     cout<<s[i];
	return 0;
}
2023/10/21 11:15
加载中...