Two police officers in Pelham have quit their jobs rather than face charges that they were involved in illegal gambling.