title: trying to save data that is in an array to a file
body: <p>This is my attempt at saving to a file. Once I enter the filename, it will save a file with that name, but it does not print anything to it and I dont get why. </p>
  
  <pre><code>if (menuoption == 6)
  {
      printf("please enter a file name\n");
      scanf("%s", filename);
      filepointer = fopen(filename, "a");
      if (filepointer == NULL);
      {                           
          printf("unable to open file name: %s\n", filename);
          continue;
      }
  
      fprintf(filepointer, "decimal values:");
  
      for (int i = 0; i &lt; doubcount; i++)
      {
          fprintf(filepointer, "%lf \n", doubles[i]);
      }
  
      fprintf(filepointer, "\n");
  
      fprintf(filepointer, "integer values: ");
  
      for (int i = 0; i &lt; intcount; i++)
      {
  
          fprintf(filepointer, "%d\n", ints[i]);
      } 
  
      fprintf(filepointer, "\n");
  }
  </code></pre>