title: Reading a .txt text file in C containing float, separated by space
body: <p>it looks common and obvious but I've already read txt file in C in the past and here I am really stuck.</p>
  
  <p>I have a txt file of this format </p>
  
  <pre><code>0.00000587898458 0.0014451541000 0.000000000001245
  0.00012454712235 0.1245465756945 0.012454712115140
  </code></pre>
  
  <p>... with 640 columns and 480 lines.</p>
  
  <p>I want to put each number of my txt file in a float with the maximum of precision as it is possible, and in a for loop.</p>
  
  <pre><code>FILE* myfile=NULL;
  double myvariable=0.0;
  myfile=fopen("myfile.txt","r");
  
  for(i =0, k=0 ; i&lt; height; i++)
      for (j=0 ; j&lt; width ; j++){
  fscanf(myfile,"%0.20f",&amp;myvariable);
  printf("%0.20f",myvariable);
  k++;
  }
  }
  fclose(myfile);
  </code></pre>
  
  <p>Thank you very much for your help</p>