Let E be the set of all even elements in Z/nZ, and suppose that HnE is not H (so H contains at least one odd element). Define the map h:H --> {-1,1} by mapping even elements to 1 and odd elements to -1. Endowing {-1,1} with the multiplicative group structure, this is a group homomorphism. By assumption, this map is surjective, and so by the first isomorphism theorem of groups we have that H/ker(h) is isomorphic to {-1,1}. In particular, ker(h) = HnE, and so the collection of all even elements of H has an index of two. Thus 2|HnE| = |H| by Lagrange's theorem, which is precisely what we wanted to show.