|

楼主 |
发表于 2025-4-11 17:32:25
|
显示全部楼层
include
int main(){
___①__;//定义文件指针fp
float f1,f2,f3;//长、宽、面积
if((fp=fopen(canshu.txt,r))==NULL)
printf(can not open the canshu.txt\n);
fscanf(fp,%f,%f,___②___);//格式化读取赋值给f1,f2
____③__; //关闭文件
if((fp=fopen(mianji.txt,w))==NULL)
printf(can not open the mianji.txt\n);
f3=f1*f2;
fprintf(fp,长方形面积:%f,___④__);//格式化输入面积到文件中
____⑤__; //关闭文件
return 0;
}
选项:
答案: 请关注ybaotk.com搜题查看答案 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|