#include<stdio.h>
#include<stdlib.h>
int main(void)
{
FILE*fp;
char ch,filename[10];
printf("please input the filename\n");
scanf("%s,&filename");
if((fp=fopen(filename,"w"))==NULL);
{
printf("can't not find this file");
exit(0);
}
ch=getchar();
printf("plese input filename");
ch=getchar();
while(ch!='#')
{fputc(ch,fp);
putchar(ch);
ch=getchar();
}
fclose(fp);
putchar(10);
return 0;
}
#include<stdlib.h>
int main(void)
{
FILE*fp;
char ch,filename[10];
printf("please input the filename\n");
scanf("%s,&filename");
if((fp=fopen(filename,"w"))==NULL);
{
printf("can't not find this file");
exit(0);
}
ch=getchar();
printf("plese input filename");
ch=getchar();
while(ch!='#')
{fputc(ch,fp);
putchar(ch);
ch=getchar();
}
fclose(fp);
putchar(10);
return 0;
}