Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char *argv[])
- {
- float i=0;
- float x[10];
- FILE *fpi,*fpo;
- if(argc!=3)
- if(argc!=2)
- {
- fprintf(stderr,"Usage: %s (1)CSV1File\n(2)CSV2File\n(3)VTKFile\n",argv[0]);
- return 0;
- }
- printf("Open CSV1 File\n");
- if((fpi=fopen(argv[1],"r"))==NULL)
- {
- printf("The file can't be opened. The program is exit.\n");
- return 0;
- }
- if((fpo=fopen(argv[2],"w"))==NULL)
- {
- printf("The file can't be opened. The program is exit.\n");
- return 0;
- }
- while (fscanf(fpi," %f %f %f %f %f %f %f %f %f %f",x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9])!= EOF)
- {
- }
- float min(float *x[])
- {
- float min=x[0];
- for(float i=1;i<i+1;++i){
- if(x[0]>x[i]){
- min=x[i];
- }
- }
- printf("minimum=%f\n",min);
- fclose(fpi);
- fclose(fpo);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement