A file of student records contains name, gender (M or F), age (in years) and marital status (single or married) for each student. Design an algorithm that will read through the file and calculate the numbers of married men, single men, married women and single women. Print these numbers on a student summary report. If any single men are over 30 years of age, print their names and ages on a separate eligible bachelors report.
include desk check ( input data, expected result and desk checking table)