Write an algorithm to delete the fifth record in a master file of 50 records stored on magnetic tape.