刚学tc,菜鸟求助
#include<graphics.h>
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
# include "math.h"
void zhuce(void);
void zhuce1(void);
void run(void);
int a,b,i;
unsigned long s,x,o;
main()
{
float num[10];
float a;
int i;
FILE *ff,*fp;
ff=fp=NULL;
fp=fopen("string","rb");
for(i=0;i<=4;i=i+1)
fread(&num[i],sizeof(int),1,fp);
if (num[2]==(num[0]+345-num[1])
{printf("num=%d \n",num[i]);}
if (num[3]==(num[0]+7338-b+num[2])
{printf("num=%d \n",num[i]);}
if (num[4]==(num[2]*728+3465)*num[0]+56234+num[0]*b+num[3]
+num[2])
{printf("num=%d \n",num[4]);}
fclose(fp);
for(i=0;i<=4;i=i+1)
printf("num=%f \n",num[i]);
}
想从文件中读出数值
做一下数值的比较
错误多多
请指点指点