#include <stdio.h>
#include <stdlib.h>
void main( )
{
char file1[30],file2[30];
FILE *fpr,*fpw;
printf("Iuput the file names:\n");
scanf("%s%s",file1,file2);
if ((fpr=fopen(file1,"r"))==NULL)
{ printf("can't open file1\n");
exit(0); }
if ((fpw=fopen(file2,"w"))==NULL)
{ printf("can't open file2\n");
exit(0); }
while(!feof(fpr))
{if ((fgetc(fpr))>='a' && (fgetc(fpr))<='z')
fputc(fgetc(fpr)-32,fpw);
else
fputc(fgetc(fpr),fpw);}
fclose(fpr);
fclose(fpw);
}
这个程序错在哪里了?或者提供个正确的答案。。谢了谢了,急!
说明白点。。。表示能不能帮我修改一下。。