小编Use*_*und的帖子

c中的加密不起作用

在下面的程序中,我想加密一个句子.然而,当空间到来时它会提供不完整的输出.任何帮助都非常有用.

#include<stdio.h>
#include<string.h>
main()
{
    printf("Enter a string : ");
    char c[100];
    scanf("%s",c);
    int i;
    for(i=0;i<100;i++)
    {
        if((c[i]>='A'&&c[i]<='Z')||(c[i]>'a'&&c[i]<'z'))
        {
            c[i]+=13;
            if(!(c[i]>='A'&&c[i]<='Z')||(c[i]>'a'&&c[i]<'z'))
            c[i]-=26;
        }
    }
    printf("Encrypted string is : %s\n",c);
}
Run Code Online (Sandbox Code Playgroud)

提前致谢

c encryption

2
推荐指数
1
解决办法
62
查看次数

标签 统计

c ×1

encryption ×1