Write a program that read the grades.txt file and then prints the average grade of male and female students and the number of passed students by using the following functions:
1. double AverageM(string filename)
This function should find the average grade of male students
2. double AverageF(string filename) This function should find the average grade of female students
3. int pass(string filename)
This function gives the total number of passed students. Note that the passing grade is 50.