C语言——一些处理脚本(3)——(待完善)

# include 
# include 
# include 
# include 

# define N   30
int main(void)
{
  int i;
  double x[N], y[N], z[N];
  FILE *fp;

  for(i=0;i<N/2;i++)
  {
      x[i]=0;
      y[i]=8;
      z[i]=4*i;
  }
  for(i=N/2;i<N;i++)
  {
      x[i]=4;
      y[i]=8;
      z[i]=116-4*i;
  }
  fp=fopen("snp0","w");
  for(i=0;i<N;i++)
  { 
    fprintf(fp,"%.3f    %.3f    %.3f\n",x[i],y[i],z[i]); 
  }
  fclose(fp);
  return 0;
}

你可能感兴趣的:(C/C++学习与运用,c语言)