www.pudn.com > ciet.rar > readcie.c


#include 

main() {
  double L[100],ciex[100],ciey[100],ciez[100];
  int i,n;
  FILE *ciefp;

  if ((ciefp = fopen("ciexyz.dat","r")) == NULL) {
    fprintf(stderr,"Can't read from ciexyz.dat");
    exit (1);
  }
  for (n=0; !feof(ciefp) && n<100; n++) {
    fscanf(ciefp,"%lf%lf%lf%lf",L+n,ciex+n,ciey+n,ciez+n);
  }
  fclose(ciefp);

  /* Your code goes here */
}