文件题
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
程序代码:
#include <stdio.h>
int main()
{
FILE *fa,*fb;
int n;
fa=fopen("a.dic.txt","r");
fb=fopen("user.out.txt","w");
if(fa==NULL||fb==NULL)
{
printf("Can not open file!\n");
exit(0);
}
fscanf(fa,"%d",&n);
n=n*n;
fprintf(fb,"%d",n);
fclose(fa);
fclose(fb);
return 0;
}