该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
int main(void)
{
FILE *wen1,*wen2;
system("color f0");
char a[1000]={0};
int i=0;
xx ch={0,0};
wen1=fopen("shuru.txt","r");
if (wen1!=NULL)
{
while(!feof(wen1))
{
fread(&a[i++],1,1,wen1);
}
ch=chinesecount(a);
printf("%s\n",a);
printf("大写字母%d\n",benglishcount(a));
printf("小写字母%d\n",senglishcount(a));
printf("中文符号%d\n",ch.fuhao);
printf("汉字%d\n",ch.hanzi);
printf("英文符号%d\n",efuhaocount(a));
printf("单词%d\n",wordscount(a));
fclose(wen1);
wen2=fopen("shuchu.txt","w");
if(wen2!=NULL)
{
fprintf(wen2,"%s\n",a);
fprintf(wen2,"大写字母%d\n",benglishcount(a));
fprintf(wen2,"小写字母%d\n",senglishcount(a));
fprintf(wen2,"中文符号%d\n",ch.fuhao);
fprintf(wen2,"汉字%d\n",ch.hanzi);
fprintf(wen2,"英文符号%d\n",efuhaocount(a));
fprintf(wen2,"单词%d\n",wordscount(a));
fclose(wen2);
}
else{printf("can't open the file.\n");}
}
else{printf("can't open the file.\n");}
system("PAUSE");
return 0;
}