大家给改改程序吧 我是菜鸟
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/05 21:55:41
大家给改改程序吧 我是菜鸟
#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");
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
#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
#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