I have one more question regarding the writing to a text file. I posted earlier yesterday and resolved the permission issues. The program is working technically... but not as expected. I'm not sure what I've done wrong here... Please view code below and attached files which shows the difference between what the user sees on the display (printf) and what the user sees in the text file (fprintf). I would appreciate a point in the right direction. Thanks!
int main (void)
void pyramid(FILE *fpNumbs);
if (fpNumbs == NULL)
printf("Error opening text file!!\n");
/*~~~~~~~~~~~~~~~~~ pyramid Function ~~~~~~~~~~~~~~~
Run through 9 rows and 9 columns, each time de-incrementing
the column by one. Display number pattern to user.
void pyramid(FILE *fpNumbs)
/* LOCAL DEFINITIONS */
/* STATEMENTS */
printf("%d ", col);
fprintf(fpNumbs, "%d ", col);
}/* counter loop*/