📄 wfile.bak
字号:
#include<stdio.h>
main()
{
int i,i1;
char ch,ch1;
float f,f1;
FILE * fp;
printf("\nInput ch i f:");
scanf("%c%d%f",&ch,&i,&f);
if((fp=fopen("dform.dat","w"))==NULL)
{
printf("Can not open the file\n");
exit(0);
}
fprintf(fp,"%c%5d%4.1f",ch,i,f);
fclose(fp);
if((fp=fopen("dform.dat","r"))==NULL)
{
printf("Can not open the file\n");
exit(0);
}
fscanf(fp,"%c%d%f",&ch1,&i1,&f1);
printf("%c%5d%4.1f",ch1,i1,f1);
fclose(fp);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -