#include
using namespace std;
int main()
{
char zm[26];
char c1,c2,c3,c4,c5;
for(int i=0;i<26;i++)
zm[i]='a'+i;
cout<<'请输入密码'<<endl;
cin>>c1>>c2>>c3>>c4>>c5>>endl;
cout<<'加密:'<<jiem(c1)+jiem(c2)+jiem(c3)+jiem(c4)+jiem(c5)<<endl;
return 0;
}
char jiem(char sa)
{
char sd ;
for (int i=0;i<=23;i++)
if(zm[i]==sa)
break;
return sd =zm[(i+4)%24] ;
}
编译失败/storage/emulated/0/Code/C/Main/Main.c:11:11: warning: character constant too long for its type cout>' (operand types are 'std::__ndk1::basic_istream' and '') cin>>c1>>c2>>c3>>c4>>c5>>endl; ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ compilation terminated due to -Wfatal-errors.