Does anyone have any idea why this program doesn't write whether the input number is a prime or not to a txt file?

Code:#include <values.h> #include <limits.h> #include <stdio.h> #include <process.h> #include <conio.h> int write_function(); int main(void) { printf(" Welcome to the Prime Number Program\n"); printf("This program will determine if a number is a prime number.\n"); write_function(); getch(); return 0; } int write_function() { FILE *prime_file; int number, i, remainder; int not_divisible = 1; int biggest = 1; prime_file = fopen("prime_io.txt", "w"); printf("Enter a number(e.g. 1972): "); scanf("%d", &number); for( i = 2; i < number - 1; i++ ) { remainder = number % i; if(remainder == 0 ) { not_divisible = 0; biggest = i; } } if(not_divisible == 1) fprintf(prime_file, "\nThe number %d is a prime number", number); else fprintf(prime_file, "\nThis number's highest divisor is %d and thus is not prime", biggest); fclose(prime_file); }