新手问题,怎么显示不了密文?
#include<stdio.h>#include<string.h>intmain(){intresult=1;inti;intcount=0;chartext[128...
#include<stdio.h>
#include<string.h>
int main()
{
int result=1;
int i;
int count=0;
char text[128]={'\0'};
char cryptograph[128]={'\0'};
printf("请输入要加密的明文\n");
scanf("%s",&text);
count=strlen(text);
for(i=0;i<count;i++);
{
cryptograph[i]=text[i]+i+5;
}
cryptograph[i]='\o';
printf("加密后的密文是:%s\n",cryptograph);
return 0;
} 展开
#include<string.h>
int main()
{
int result=1;
int i;
int count=0;
char text[128]={'\0'};
char cryptograph[128]={'\0'};
printf("请输入要加密的明文\n");
scanf("%s",&text);
count=strlen(text);
for(i=0;i<count;i++);
{
cryptograph[i]=text[i]+i+5;
}
cryptograph[i]='\o';
printf("加密后的密文是:%s\n",cryptograph);
return 0;
} 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询