请求对这个程序出现的错误解答,#include "stdio.h"main(){FILE *fp,*fp1;float d1,d;float vol[1024];unsigned int a[1024];int i,NUM;if((fp=fopen("E:\lys.pci","rb"))=NULL){printf("cannot open this file!\n");exit(0);}if((fp1=fopen("E:\A.txt","w
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/27 04:00:30
请求对这个程序出现的错误解答,#include "stdio.h"main(){FILE *fp,*fp1;float d1,d;float vol[1024];unsigned int a[1024];int i,NUM;if((fp=fopen("E:\lys.pci","rb"))=NULL){printf("cannot open this file!\n");exit(0);}if((fp1=fopen("E:\A.txt","w
请求对这个程序出现的错误解答,
#include "stdio.h"
main()
{
FILE *fp,*fp1;
float d1,d;
float vol[1024];
unsigned int a[1024];
int i,NUM;
if((fp=fopen("E:\lys.pci","rb"))=NULL)
{printf("cannot open this file!\n");
exit(0);}
if((fp1=fopen("E:\A.txt","w"))=NULL)
{printf("cannot open this file!\n");
exit(0);}
fseek(fp,64L,0);
scanf("%d,&NUM");
for(i=0;i65536/2)
{
d1=d ;
vol[i]=(a[i]-65536/2)*20/65536;
}
else
{
d1=-d;
vol[i]=-a[i]*20/65536;
}
fprintf(fp1,"%f\t",&vol[i]);
if(i%64==0)
fprintf(fp1,"\n");
}
fclose(fp);
fclose(fp1);
}
错误为:错误 lys.c 9:需要逻辑0或非0在 main 函数中
错误 lys.c 12:需要逻辑0或非0在 main 函数中
错误 lys.c 20:语句缺少';'在 main 函数中
请求对这个程序出现的错误解答,#include "stdio.h"main(){FILE *fp,*fp1;float d1,d;float vol[1024];unsigned int a[1024];int i,NUM;if((fp=fopen("E:\lys.pci","rb"))=NULL){printf("cannot open this file!\n");exit(0);}if((fp1=fopen("E:\A.txt","w
if((fp=fopen("E:\lys.pci","rb"))==NULL) ==不是=
if((fp1=fopen("E:\A.txt","w"))==NULL) ==不是=
fscanf(fp,"%s\n",a[i])后面加分号