这段汉字加解密程序哪错了?
#include<stdio.h>#include<conio.h>
int main()
{
int i;
FILE *fp;
fp=fopen("a.txt","wb+");
char x[20] ={"今天天气很晴朗!\0"};
for(i=0;x[i]!='\0';i++)
{if(x[i]>='A'&&x[i]<='z')x[i]++;
else if(x[i]<'A')x[i]++;
else x[i]--;}
fwrite(x,20,1,fp);
getch();
fread(x,20,1,fp);
for(i=0;x[i]!='\0';i++)
{if(x[i]>='A'&&x[i]<='z')x[i]--;
else if(x[i]<'A')x[i]--;
else x[i]++;
}
for(i=0;i<20;i++)
printf("%c",x[i]);
getch();
return 0;
}
这段汉字加解密程序不知道哪错了?显示不出来!