大家给改改程序吧 我是菜鸟 #include int main(){int x;printf("choose:\n1:jiami!\n2:jiemi!\n3:wumafenxi!\n4:tuichu!\n");scanf("%d",&x);if(x==1)crypt();else if(x==2)decrypt();else if(x==3) count();else if(x==4)exit(0); else{ printf("Error!\n"
来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/11 15:23:48
大家给改改程序吧 我是菜鸟 #include int main(){int x;printf("choose:\n1:jiami!\n2:jiemi!\n3:wumafenxi!\n4:tuichu!\n");scanf("%d",&x);if(x==1)crypt();else if(x==2)decrypt();else if(x==3) count();else if(x==4)exit(0); else{ printf("Error!\n"
大家给改改程序吧 我是菜鸟
#include
int main()
{
int x;
printf("choose:\n1:jiami!\n2:jiemi!\n3:wumafenxi!\n4:tuichu!\n");
scanf("%d",&x);
if(x==1)
crypt();
else if(x==2)
decrypt();
else if(x==3)
count();
else if(x==4)
exit(0);
else
{ printf("Error!\n");
main();}
main();
}
crypt() //
{
FILE *pt,*ct;
char key,infile[3000],outfile[3000];
int n=0,ch;
float from[1000] ;
float to[1000] ;
float f,x=0.0012,u=1.9;
int i = 0 ;
printf("inputmingwenlujing\n");
scanf("%s",outfile);
if((ct=fopen(outfile,"rb"))==NULL)
{
printf("error");
decrypt();
}
printf("inputmingwen:\n");
scanf("%s",infile);
if((pt=fopen(infile,"wb"))==NULL)
{
printf("error!");
decrypt();
}
while(!feof(ct))
{
fread(&from[n],4,1,ct) ;
n++;
}
printf("\n");
n = n-1 ;
rewind(pt);
rewind(ct);
for(i=0;i
大家给改改程序吧 我是菜鸟 #include int main(){int x;printf("choose:\n1:jiami!\n2:jiemi!\n3:wumafenxi!\n4:tuichu!\n");scanf("%d",&x);if(x==1)crypt();else if(x==2)decrypt();else if(x==3) count();else if(x==4)exit(0); else{ printf("Error!\n"
#include
#include
void crypt();
void decrypt();
void count();
int main()
{
int x;
loop:
printf("choose:\n1:jiami!\n2:jiemi!\n3:wumafenxi!\n4:tuichu!\n");
scanf("%d",&x);
if(x==1)
crypt();
else if(x==2)
decrypt();
else if(x==3)
count();
else if(x==4)
return 0; ////exit(0);
else
{ printf("Error!\n");
goto loop;//main();
}
goto loop;//main();
}
void crypt() //
{
FILE *pt,*ct;
char key,infile[3000],outfile[3000];
int n=0,ch;
float from[1000] ;
float to[1000] ;
float f,x=0.0012,u=1.9;
int i = 0 ;
printf("inputmingwenlujing\n");
scanf("%s",outfile);
if((ct=fopen(outfile,"rb"))==NULL)
{
printf("error");
decrypt();
}
printf("inputmingwen:\n");
scanf("%s",infile);
if((pt=fopen(infile,"wb"))==NULL)
{
printf("error!");
decrypt();
}
while(!feof(ct))
{
fread(&from[n],4,1,ct) ;
n++;
}
printf("\n");
n = n-1 ;
rewind(pt);
rewind(ct);
for(i=0;i